1
我有了新的使用SQL和我已經得到了一個錯誤:每次SQL構造或語句不支持
sql construct or statement is not supported
在Visual Studio我執行該語句:
IF (SELECT [Product_Availability] FROM Product WHERE [Product_Name] = @name) = 'True'
UPDATE [Product] SET [Product_Availability] = 'False'
WHERE ([Product_Name] = @name)
ELSE
UPDATE Product SET [Product_Availability] = 'True'
WHERE ([Product_Name] = @name)
雖然儘管Visual Studio的查詢部分存在錯誤,但它仍能正常工作;然而,當我在我的數據庫處理程序類中調用它時不會。任何幫助,將不勝感激!
謝謝!我對SQL依然很陌生,所以對此我很sl with。 –