人员账号所属权限模块

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

相关推荐
tqs_123456 分钟前
tcc中的空回滚和悬挂问题
java·数据库
哪里不会点哪里.24 分钟前
Spring 事务机制详解:原理、传播行为与失效场景
java·数据库·spring
IT大白40 分钟前
8、MySQL相关问题补充
数据库·sql
爪哇天下41 分钟前
Mysql实现经纬度距离的排序(粗略的城市排序)
数据库·mysql
独自破碎E43 分钟前
MySQL中有哪些日志类型?
数据库·mysql
笨蛋不要掉眼泪1 小时前
Redis核心数据类型与命令
数据库·redis·缓存
数据知道2 小时前
一文掌握 MongoDB 详细安装与配置(Windows / Linux / macOS 全平台)
linux·数据库·windows·mongodb·macos
Knight_AL2 小时前
Flink 状态管理详细总结:State 分类、Keyed State 实战、Operator State、TTL、状态后端选型
前端·数据库·flink
ADRU2 小时前
Dify API 数据库连接与 Session 管理架构调研
数据库·架构
zhglhy2 小时前
Redis Cluster 的数据分片机制
数据库·redis·缓存