2010-01-08 60 views
0

海家伙,
这个sql语法有什么问题?

当我执行下面的SQL查询

select User.[User_Id],User.[User_Name],User.Email_Id,User.Password,Role.Role_Id,Role.Role_Name,Role.Role_Description 
From [User] inner join [Role] on User.Role_Id=Role.Role_Id 

什么是错在上面的查询,我得到了错误Cannot call methods on nvarchar.

回答

6

您可能需要将user分隔为[user]。我相信这是一个保留关键字。

+0

@这样做的伎俩 – 2010-01-08 18:56:44