![](/img/trans.png)
[英]Msg 102, Level 15, State 1, Line 8 Incorrect syntax near '-' , Grant View SQL Server error
[英]SQL query is throwing this error Msg 102, Level 15, State 1, Line 1 Incorrect syntax near ' '
查詢是:
select * from Test.dbo.Test_Spoc where spocNo = 54986
在SQL 2008中,其拋出錯誤''附近的語法不正確。 如果我在Where之前刪除了空格,然后再次使該空格起作用。 在SQL 2012中,此查詢在此空間中的問題之前也顯示紅色符號。
我想知道早期空間無法使用的原因是什么?
select * from Test.dbo.Test_Spoc where spocNo = '54986'
添加單引號,我認為這可能是問題所在; 您檢查代碼
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.