Y2S1-Database_Design/SQL/queries/query 1.sql

5 lines
180 B
MySQL
Raw Normal View History

2020-06-07 21:29:59 +00:00
SELECT UserName, RoleName
FROM Users
LEFT JOIN RoleAllocation ON RoleAllocation.UserID = Users.UserID
LEFT JOIN Roles ON Roles.RoleID = RoleAllocation.RoleID
WHERE Users.UserId = 1