我还有一个问题。它仅在 MSSQL 服务器中提供:
select theme0_.id as id12_, theme0_.user as user12_, theme0_.theme as theme12_
from theme theme0_ where theme0_.user=1
此查询给出错误:
关键字“用户”附近的语法不正确。
但是查询在 MySQL 服务器中正确执行。请帮我。谢谢!!
我还有一个问题。它仅在 MSSQL 服务器中提供:
select theme0_.id as id12_, theme0_.user as user12_, theme0_.theme as theme12_
from theme theme0_ where theme0_.user=1
此查询给出错误:
关键字“用户”附近的语法不正确。
但是查询在 MySQL 服务器中正确执行。请帮我。谢谢!!
这是因为USER
是一个保留字,SQL Server
需要在查询中使用方括号进行转义[]
。
您的查询应如下所示
select [id] as id12_,
[user] as user12_,
[theme] as theme12_
from theme
where [user] = 1