人员账号所属权限模块

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 部门编号,人员编号

相关推荐
期待のcode3 小时前
MyBatisX插件
java·数据库·后端·mybatis·springboot
安审若无5 小时前
oracel迁移数据文件至其他目录操作步骤
数据库
sunxunyong5 小时前
doris运维命令
java·运维·数据库
小鸡吃米…6 小时前
Python PyQt6教程七-控件
数据库·python
忍冬行者6 小时前
清理三主三从redis集群的过期key和键值超过10M的key
数据库·redis·缓存
TimberWill6 小时前
使用Redis队列优化内存队列
数据库·redis·缓存
Knight_AL7 小时前
MySQL 中 UPDATE 语句的执行过程全解析
数据库·mysql
Li.CQ7 小时前
SQL学习笔记(二)
笔记·sql·学习
yngsqq7 小时前
兰顿蚂蚁——CAD二次开发
数据库
梁萌8 小时前
ShardingSphere分库分表实战
数据库·mysql·实战·shardingsphere·分库分表