人员账号所属权限模块

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

相关推荐
姚不倒20 分钟前
etcd 学习系列(一):从业务需求出发,理解 etcd 是什么
运维·数据库·etcd
susplus29 分钟前
【linux应用软件编程】数据库sqlite3
linux·数据库·sqlite
SelectDB32 分钟前
Apache Doris + Lance:让多模态数据真正进入智能驾驶与具身智能的分析闭环
数据库
互联网叫兽38 分钟前
redis深入学习二
数据库·redis·学习
疯狂打码的少年1 小时前
【数据库技术】复习日:关系代数 + SQL + 规范化(整理对比表)
jvm·数据库·笔记·sql
先吃饱再说1 小时前
从零开发到工程查询:SQLite 嵌入式数据库与高级 SQL 实战
数据库
ShineWinsu2 小时前
对于MySQL:数据库的操作的解析
linux·数据库·c++·mysql·面试·笔试·库的操作
‎ദ്ദിᵔ.˛.ᵔ₎2 小时前
MySQL 数据类型
数据库·mysql
这个DBA有点耶2 小时前
索引合并不是万能药:MySQL同时用两个索引,为什么比不用还慢?
数据库·mysql·dba
Aime_Perfect3 小时前
sqlserver AlwaysOn(一)
数据库·sqlserver