我想从 3 个表中选择值,我为此使用内连接,我正在使用以下查询
SELECT
UserDetail.UserId 'userId',
FirstName 'name',
Name 'role'
FROM UserDetail as ud
inner join UserRole as ur ON ud.UserId = ur.UserId
inner join [Role] as r ON r.RoleId=ur.RoleId
WHERE Username = @username and [Password] =@password
它向我显示以下错误:无法绑定多部分标识符 UserId(UserDetail.UserId)。谁能告诉我我做错了什么。谢谢