人员账号所属权限模块

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

相关推荐
liulilittle13 分钟前
Linux shell 搜索指定后缀名文件,并复制到指定目录。
linux·服务器·数据库
必胜刻13 分钟前
Redis哨兵模式(Linux)
linux·数据库·redis
dualven_in_csdn36 分钟前
【数据库损坏】关于一次现场数据库损坏
数据库·mysql
锦衣夜行?1 小时前
oracle 未知长度从左到右截取某个字符串
数据库·oracle
han_hanker1 小时前
@JsonIgnore,@JsonProperty, @JsonInclude,@JsonFormat
数据库·oracle
hanyi_qwe1 小时前
MySQL事务基础
数据库·mysql
l1t1 小时前
三种用SQL解决Advent of Code 2022第8题 树顶木屋 的比较和分析
数据库·sql·oracle·duckdb·advent of code
如果未来,1 小时前
Oracle的Redo log和Undo log的区别
数据库·oracle
koping_wu2 小时前
【方案设计】Mysql相关场景
数据库·mysql
杨云龙UP2 小时前
SQL Server小技巧:用 SSMS 重置登录密码,不影响正在运行的系统
运维·服务器·数据库·sql·sqlserver