用户角色功能
创建视图:
SELECT a.UserId, a.UserName, c.RoleId, c.RoleName, e.FunId, e.FunName
FROM dbo.Userinfo AS a LEFT OUTER JOIN
dbo.UserRole AS b ON b.UserId = a.UserId LEFT OUTER JOIN
dbo.RoleInfo AS c ON c.RoleId = b.RoleId LEFT OUTER JOIN
dbo.RoleFun AS d ON d.RoleId = c.RoleId LEFT OUTER JOIN
dbo.FunInfo AS e ON e.FunId = d.FunId