1
我試着用下面的在MySQL重複鍵更新插入:插入上的重複更新MySQL錯誤
INSERT INTO `generic_client_data` (id, keyword, client_id, desc_id)
VALUES (NULL, qqqq, 115, 0) ON DUPLICATE KEY
UPDATE keyword=VALUES(qqqq), client_id=VALUES(115), desc_id=VALUES(0)
,但它給了我這個錯誤:
#1064 - 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 '115), desc_id=VALUES(0)' at line 1
是否有一個原因爲什麼?
這是創造#1054 - 在「字段列表」未知列「QQQQ」錯誤... – user952543
'qqqq' =值你已經提供了,而不是COLUMN – ajreal
id,關鍵字,client_id,desc_id是值,而qqqq是值爲 – user952543