人员账号所属权限模块

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

相关推荐
LUCIAZZZ3 小时前
简单的SQL语句的快速复习
java·数据库·sql
Elastic 中国社区官方博客5 小时前
使用真实 Elasticsearch 进行高级集成测试
大数据·数据库·elasticsearch·搜索引擎·全文检索·jenkins·集成测试
@_@哆啦A梦5 小时前
Redis 基础命令
java·数据库·redis
fajianchen5 小时前
MySQL 索引存储结构
数据库·mysql
一张假钞5 小时前
Spark SQL读写Hive Table部署
hive·sql·spark
想做富婆5 小时前
oracle: 多表查询之联合查询[交集intersect, 并集union,差集minus]
数据库·oracle·联合查询
xianwu5437 小时前
反向代理模块jmh
开发语言·网络·数据库·c++·mysql
Leven1995277 小时前
Flink (十三) :Table API 与 DataStream API 的转换 (一)
数据库·sql·flink
geovindu7 小时前
neo4j-community-5.26.0 create new database
数据库·mysql·neo4j
因特麦克斯8 小时前
索引的底层数据结构、B+树的结构、为什么InnoDB使用B+树而不是B树呢
数据库