人员账号所属权限模块

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

相关推荐
正在走向自律15 分钟前
深度剖析 KES 行标识体系:OID 与 ROWID 核心原理、实战案例及性能优化
数据库·oid·kes·rowid
一直都在57229 分钟前
MySQL索引优化
android·数据库·mysql
wjp@00144 分钟前
SQL server导出导入数据
运维·服务器·数据库
脑子加油站44 分钟前
MySQL8数据库高级特性
数据库·mysql
REDcker1 小时前
OpenSSL:C 语言 TLS 客户端完整示例
c语言·网络·数据库
zly35001 小时前
centos7 mysql 无法被远程连接
数据库·mysql
廿一夏1 小时前
MySql的增删改查
数据库·mysql·dba
瀚高PG实验室1 小时前
HGDB 4.5.8.8开启oracle兼容执行带聚合函数的SQL导致数据库进程被信号11杀死
数据库·sql·oracle·瀚高数据库
炘爚2 小时前
日志系统整体设计步骤以及功能函数梳理
运维·服务器·数据库
_下雨天.2 小时前
PostgreSQL日常维护
数据库·postgresql