我在Android上使用SQLite和運行此命令時,我得到了一個問題:SQL語句給錯誤
UPDATE vocab_words SET correct = 5
WHERE
name = 'AQA GCSE Spanish Higher',
foreign_word = 'campo, el',
english_meaning = 'field, the'
有什麼問題嗎? 在此先感謝。
我在Android上使用SQLite和運行此命令時,我得到了一個問題:SQL語句給錯誤
UPDATE vocab_words SET correct = 5
WHERE
name = 'AQA GCSE Spanish Higher',
foreign_word = 'campo, el',
english_meaning = 'field, the'
有什麼問題嗎? 在此先感謝。
您運行的SQL查詢語法從error.Change查詢:
UPDATE vocab_words SET correct = 5 WHERE name = 'AQA GCSE Spanish Higher', foreign_word = 'campo, el', english_meaning = 'field, the'
到:
UPDATE vocab_words SET correct = 5 WHERE name = 'AQA GCSE Spanish Higher'AND foreign_word = 'campo, el'AND english_meaning = 'field, the'
此外,我建議你閱讀使用一些教程SQL的基本知識。這是基本錯誤之一。
好的,我會感謝 – NightStrider 2013-03-10 18:11:39
結合使用AND
而不是comma(,)
的兩個或多個簡單條件。
UPDATE vocab_words設置正確的= 5 WHERE name = 'AQA GCSE西班牙 高',foreign_word = '坎波,厄爾尼諾',english_meaning = '領域,'
替換
UPDATE vocab_words SET correct = 5 WHERE name ='AQA GCSE Spanish Higher'AND foreign_word ='campo,el'AND english_meaning ='field,the'
從最初觀看您的文章更新的說法應該是 -
UPDATE vocab_words SET correct = 5 WHERE name = 'AQA GCSE Spanish Higher' and foreign_word = 'campo, el' and english_meaning = 'field, the'
WATS的概率把堆棧跟蹤 – DjHacktorReborn 2013-03-10 18:09:21
@DjHacktorReborn請使用[正確的語法(http://meta.stackexchange.com/q/129729/188646)as [Writing Style Matters](http://stackoverflow.com/questions/how-to-answer)。 – Sam 2013-03-10 18:22:57