What is wrong with the following SQL statement?开发者_JAVA百科
INSERT INTO thread (deleted)
VALUES ('2009-01-02 17:41:02')
WHERE thread.id = 28
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 'WHERE thread.id = 28' at line 3
EDIT: I'm such an Idiot... UPDATE!!!
Thank you.
http://dev.mysql.com/doc/refman/5.0/en/update.html
UPDATE thread
SET deleted = TIMESTAMP '2009-01-02 17:41:02'
WHERE id = 28;
You can't put a where
in an insert...values...
statement. What are you trying to do?
精彩评论