Yesterday when the project, encountered the title problem, code tracking SQL statements copied out in the database can not be executed,
And then write the exact same, and then in the assignment to the code, or the same error,
Just don't know where the error is, and finally write the SQL statement as the simplest select * from tab or the same error.
Then, then it won't.
Finally in this statement write the same statement, finally found the problem, the new SQL statement of the select changed color, and the previous
The assigned select is the same color as the field table name, proving that the system does not recognize it as a keyword,
Delete this select to write again in this position, or the same error,
Finally found in the front of this select has a full-width space, full-width space is really invisible to the naked eye ah,
Suddenly, only to know that "there is a grammatical error near the space, meaning that there are grammatical errors,
Proof is not a space format supported by SQL Server.
This problem Baidu, also did not solve, hope can help other people, is not particularly difficult things, but find the problem is still a waste of time.
Syntax error near SQL Server database '