组合权限查询 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
原文地址:https://www.cnblogs.com/hopesun/p/9082364.html
时间: 2024-10-19 01:29:39