人员账号所属权限模块

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

相关推荐
泡海椒1 分钟前
JQuick-SQL JOIN 查询:连接注册数据集的正确方式
数据库·sql
xiaogai_gai15 分钟前
钉钉月结报销到金蝶付款单同步方案实战教程
大数据·数据库·钉钉
Nturmoils39 分钟前
报表总在扫大表,列存储应该放在哪一层
数据库
夜雪一千1 小时前
ShardingSphere 雪花 / UUIDv7 主键分片实战 + SQL 建表示例
数据库·sql
Elastic 中国社区官方博客2 小时前
Elasticsearch:安装自行管理的 Elastic Stack 集群
大数据·运维·服务器·数据库·elasticsearch·搜索引擎·全文检索
PingCAP2 小时前
Agent 从 Demo 到生产,到底卡在哪?
数据库·tidb·agent
SelectDB3 小时前
开源替代怎么选:能力对照、三条部署路径与四类边界速查
数据库·云原生·开源
SelectDB3 小时前
自建与托管怎么选:开源自建、私有化与云上托管三条路径速查
数据库·云原生·开源
这个DBA有点耶3 小时前
深入 OLTP 锁与并发:从行锁到分布式事务的一致性权衡
数据库·架构·产品
SelectDB3 小时前
数仓 TCO 怎么算:五项成本拆解框架速查
大数据·数据库·开源