人员账号所属权限模块

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

相关推荐
秦jh_17 分钟前
【Redis】Set和Zset
数据库·redis·缓存
what_201823 分钟前
PostgreSQL 时间
数据库·postgresql
Nyarlathotep011336 分钟前
Redis的数据结构(4):跳表
数据库·redis
☆56641 分钟前
如何为开源Python项目做贡献?
jvm·数据库·python
Bdygsl44 分钟前
MySQL(5)—— 聚合查询/分组查询/联合查询
数据库·mysql
m0_560396471 小时前
使用Python进行PDF文件的处理与操作
jvm·数据库·python
lhbian1 小时前
开启mysql的binlog日志
数据库·mysql
NineData1 小时前
从个人开发到企业专属集群,NineData 的产品矩阵怎么做的?
运维·数据库·程序员
2301_816651221 小时前
用Python监控系统日志并发送警报
jvm·数据库·python