1. 程式人生 > >sqlite3_prepare_v2 failure: table in_record has 6 columns but 5 values were supplied

sqlite3_prepare_v2 failure: table in_record has 6 columns but 5 values were supplied

sqllite insert語句的使用

INSERT INTO in_record (id, product_model,number,price,factory) VALUES (NULL,?,?,?,?);

如果表名後面表示插入的列名被省略了,下

INSERT INTO in_record VALUES (NULL,?,?,?,?);

意思是預設對所有列賦值。