嗨,我正在尝试获取用户 ID、名称、密码及其权限,但它多次列出用户名、ID、密码如何获取用户名、ID、密码及其权限我的查询是,
Select U.User_Id,U.User_Name,U.User_Password, PL.PermissionName from [Inspection].[dbo].[User] U
right join [Inspection].[dbo].[UsersPermission] UP
on U.User_Id=UP.User_Id inner join PermissionsList PL
on up.PermissionID=PL.PermissionID
where U.User_Id='2';
结果是,
User_Id User_Name User_Password PermissionName
2 John 123456 View
2 John 123456 Insert
希望您的建议提前感谢!