0
我需要一些幫助,我的SQL代碼:插入選擇自動遞增錯誤
insert into '.$type.' select * from ' .$type.' where effective_id = '.$id
,但我得到的錯誤與此代碼。
SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '3' for key 'PRIMARY' (SQL: insert into actionplan select * from actionplan where effective_id = 3)
任何想法如何跳過id列?我必須在幾個表上使用這個代碼。所以我不能寫所有的專欄。
什麼DBMS?這個變化與特定SQ L產品。 – RBarryYoung
根據錯誤消息添加了'mysql'標記 –