1
我不得不執行的更新查詢:系統數據的SqlClient SQLEXCEPTION
using (SqlCommand sqlCmd = new SqlCommand("UPDATE Test SET Testedpiece = Testedpiece + 1 and Rate = (Testedpiece * 100)/Totalpiece WHERE IDSuperlot = @super", connexion))
但我有這個錯誤System.Data.SqlClient.SqlException (0x80131904): Incorrect syntax near the keyword 'and'.
我不知道爲什麼會出現這個錯誤,我該如何解決
- 什麼是Sql語法錯誤?
- 我該如何解決?
有錯誤消息本身就是一個強烈的暗示:*「不正確的語法關鍵字近「和」。「* – LukeH 2013-05-09 22:37:39