我有小問題,我的SQL代碼:SQL更新遞增不工作
UPDATE articles SET like=like+1 WHERE id=1
當我試圖在phpMyAdmin來執行它,我得到這個錯誤:
#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 'like=like+1 WHERE id=1' at line 1
像int這樣的列默認設置爲0(長度爲11)。 有誰知道我該如何修復它?請幫忙。
我認爲這是因爲'like'是一個保留字。 – 2012-07-11 09:03:33
http://dev.mysql.com/doc/refman/5.5/en/reserved-words.html – 2012-07-11 09:05:25