人员账号所属权限模块

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

相关推荐
胖头鱼的鱼缸(尹海文)14 分钟前
胖头鱼的技术专栏-465 数据库能力上移还是下沉:库变弱了,应用就变重了(20260828)
数据库
2601_9621819629 分钟前
Redis Redis介绍、安装 - Redis客户端
数据库·redis·postman
2601_962062941 小时前
Spring Boot入门——Spring Boot项目的创建
java·数据库·spring boot
冰暮流星1 小时前
mysql之外键约束
数据库·mysql
茶栀(*´I`*)1 小时前
数据库零基础入门指南:从基本概念到 SQL 实战
数据库·sql
ERD Online1 小时前
Cursor 连上 MCP:读一张 ER 图,提交一版建议
数据库·后端·开源·cursor·mcp
foolishlee2 小时前
openGauss postmaster退出流程
数据库
叫我:松哥2 小时前
基于flask仿小米商城管理系统,使用flask开的一个商场网站
数据库·后端·python·flask
子非鱼a2 小时前
【WEB】[BJDCTF2020]Easy MD5
数据库
APItesterCris2 小时前
告别人工盯品:借助 OpenClaw 搭建商品自动监控与数据分析系统(完整实操)
大数据·数据库·数据仓库·自动化