[英]SQL query is throwing this error Msg 102, Level 15, State 1, Line 1 Incorrect syntax near ' '
Query is : 查询是:
select * from Test.dbo.Test_Spoc where spocNo = 54986
In SQL 2008 its throwing error Incorrect syntax near ' '. 在SQL 2008中,其抛出错误''附近的语法不正确。 IF I remove the space before Where and again give the space its working.
如果我在Where之前删除了空格,然后再次使该空格起作用。 In SQL 2012 this query is showing red sign also before Where that problem is in this space.
在SQL 2012中,此查询在此空间中的问题之前也显示红色符号。
I want to know what can be reason that earlier space is not working? 我想知道早期空间无法使用的原因是什么?
select * from Test.dbo.Test_Spoc where spocNo = '54986'
Add single quotes, I think this might be the issue; 添加单引号,我认为这可能是问题所在; you check the code
您检查代码
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.