1. 程式人生 > >組合權限查詢 SQL,UniGUI

組合權限查詢 SQL,UniGUI

SQ div select 獲取 查詢 權限 sql 方式 from

組合權限查詢 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