2012-12-24 72 views
1

您好我創建了一個產品表,一個數據庫,但是當我嘗試將數據插入到它,我得到這個錯誤:錯誤插入數據

enter image description here

這是表中的字段:

enter image description here

唯一需要的字段是前6和第一個是設置爲自動增量的索引,另外5個是我添加的。

這裏有什麼問題?

+3

你能告訴我們**你如何插入數據? –

回答

1

我假設你已經分配了PK爲自動增量...所以試試這個,

INSERT INTO products (brandid, subcatid, productname, productprice, productimagepath) VALUES (111,'P111',111,'P111.jpg'); 

Letm我知道它可以幫助你或不?