人员账号所属权限模块

select distinct

a.编码 as 部门编号,

a.名称 部门,

B.编号 as 人员编号,

b.姓名,

d.用户名,

substr(t.角色, 4, 20) as 角色,t.标题, t.说明,t.功能

from 部门表 a,

人员表 b,

部门人员 c,

上机人员表 d,

dba_role_privs e,

dba_roles f,

(select g.角色, h.序号, h.标题, h.说明, h.系统,G.功能

from (select distinct 系统, 序号, 角色,功能 from zltools.zlrolegrant) g,

zltools.zlprograms h

where g.序号 = h.序号

and h.系统 is not null) t

where e.granted_role = f.role

and f.role like '%ZL_%'

and a.id = c.部门id

and b.id = c.人员id

and b.id = d.人员id

and e.grantee = d.用户名

and f.role = t.角色

and C.缺省=1

And C.部门ID /*B0*/is not null/*E0*/

order by 部门编号,人员编号

相关推荐
rannn_11112 小时前
【SQL题解】力扣高频 SQL 50题|DAY4
数据库·后端·sql·leetcode·题解
q行12 小时前
MySQL学习日志--DQL和它的七大字句
数据库·学习·mysql
张人玉12 小时前
WPF HTTPS 通信示例使用说明
数据库·网络协议·http·c#·wpf
长春小霸王12 小时前
labview sqlite增删改查
数据库·sqlite·labview
猿小喵12 小时前
记录一次TDSQL-MySQL数据库主从延迟导致批量报错
数据库·mysql
科技块儿12 小时前
【深度解析】在响应速度与数据安全上权衡在线IP查询API与本地IP离线库
数据库·网络协议·tcp/ip
别多香了12 小时前
MySQL 部署安装与核心板块
数据库·mysql
宠..12 小时前
QButtonGroup
java·服务器·开发语言·前端·数据库·c++·qt
熊文豪12 小时前
时序数据库选型指南:如何为大数据场景选择合适的时序数据库
大数据·数据库·时序数据库·iotdb