人员账号所属权限模块

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

相关推荐
蒋士峰DBA修行之路3 小时前
实验十三 WDR诊断报告
数据库
q***33373 小时前
oracle 12c查看执行过的sql及当前正在执行的sql
java·sql·oracle
杂亿稿3 小时前
数据库的约束
数据库
u***32433 小时前
使用python进行PostgreSQL 数据库连接
数据库·python·postgresql
Codingwiz_Joy3 小时前
Day44 盲注、报错注入 & 实战复现
数据库·安全性测试
7***99875 小时前
GaussDB数据库中SQL诊断解析之配置SQL限流
数据库·sql·gaussdb
Wang's Blog6 小时前
MongoDB小课堂: 文档操作核心技术指南:主键机制、CRUD操作与最佳实践
数据库·mongodb
g***26796 小时前
最新SQL Server 2022保姆级安装教程【附安装包】
数据库·性能优化
5***o5007 小时前
PHP在电商中的支付集成
sql·ue5·rizomuv
风123456789~8 小时前
【OceanBase专栏】OB背景知识
数据库·笔记·oceanbase