首页 > 数据库技术 > 详细

组合权限查询 SQL,UniGUI

时间:2018-05-24 13:45:19      阅读:251      评论:0      收藏:0      [点我收藏+]

组合权限查询 SQL,UniGUI:

   name ,View, New, Edit, Dele      表 获取 name 的 授权。

   项目         1       0       0      0

   项目         1      0       0       1  

   合同         1      1       0      0

   合同         1      0       0      1

=========================    

 方式1:select name, max(case when b=1 then 1 else 0 end) as b , max(case when c=1 then 1 else 0 end) as c from test
group by name 
 
方式2: select name, max(case b when 1 then 1 else 0 end) as b , max(case c when 1 then 1 else 0 end) as c from test
group by name 

 

组合权限查询 SQL,UniGUI

原文:https://www.cnblogs.com/hopesun/p/9082364.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!