人员账号所属权限模块

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

相关推荐
SelectDB32 分钟前
压缩率提升 48%,详解 Apache Doris 存储压缩优化之道|Deep Dive
数据库·开源·github
DBA圈小圈32 分钟前
【KingbaseES】批量修改数据库模式、表等对象的 Owner
数据库·oracle
椰羊~王小美1 小时前
存储过程 vs 存储函数:全面对比
数据库
张人玉2 小时前
SQLite的数据格式和使用命令
数据库·oracle·sqlite
last demo2 小时前
MariaDB 数据库管理
linux·运维·服务器·数据库·php·mariadb
蒋士峰DBA修行之路2 小时前
实验二十六 GaussDB参数调优
数据库·oracle·gaussdb
q***3752 小时前
MySQL输入密码后闪退?
数据库·mysql·adb
张人玉2 小时前
SQLite 快速入门 Cheat Sheet
数据库·sql·sqlite
杨DaB2 小时前
【MySQL】03 数据库的CRUD
数据库·mysql·adb
DarkAthena2 小时前
【DuckDB】活用marco以兼容GaussDB的SQL执行
数据库·sql·duckdb