用户角色功能

创建视图:

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

posted @ 2013-11-18 17:59  just_xing  阅读(188)  评论(0编辑  收藏  举报