按照格式輸入的代碼,在命令提示行中和圖形化界面中報(bào)錯(cuò)如下的提示
[SQL] INSERT t1 VALUES(NULL,'Tom');
[Err] 1136 - Column count doesn't match value count at row 1
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that
corresponds to your MySQL server version for the right syntax to use near 'TOM)
INSERT t1 VALUES(NULL,'TOM')' at line 1
2015-12-21
你沒(méi)有指定列名的話,就要按照列名按順序逐一對(duì)應(yīng)相應(yīng)的列。你這里應(yīng)該是列和數(shù)值之間不互相對(duì)應(yīng)。
2015-08-20
沒(méi)指定列名要依次為每個(gè)列都賦正確的值,可能是賦值不對(duì)
2015-06-04
建立表是成功的,能查詢表,對(duì)插入數(shù)據(jù)總報(bào)錯(cuò)