人员账号所属权限模块

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

相关推荐
2301_789380492 小时前
vsc中使用DBHub-MCP连接云Mysql到vsc-copilot
数据库·mysql
杨DaB2 小时前
【MySQL】02 数据库的基本操作
数据库·mysql·oracle
jnrjian2 小时前
Oracle hints 空格要求
sql·oracle
m***66732 小时前
SQL 实战—递归 SQL:层级结构查询与处理树形数据
java·数据库·sql
昙鱼2 小时前
Markdown文件导入Milvus向量数据库完整指南
数据库·ai·milvus
A__tao2 小时前
gotool.top 的 SQL 转 Markdown
数据库·sql
Austindatabases3 小时前
基于SQLite如何设计应用程序,拆散,散,还的散!
数据库·sqlite
矶鹬笛手4 小时前
(2.1) 信息技术及其发展
sql·计算机网络·c#
马克学长5 小时前
SSM面向乡村振兴服务的产教融合服务平台521gh(程序+源码+数据库+调试部署+开发环境)带论文文档1万字以上,文末可获取,系统界面在最后面
数据库·乡村振兴·ssm 框架·服务平台
u***27615 小时前
C#数据库操作系列---SqlSugar完结篇
网络·数据库·c#