人员账号所属权限模块

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

相关推荐
川贝枇杷膏cbppg13 分钟前
dm_unknown_202512.log:达梦数据库 “未分类日志“
数据库·oracle
计算机毕设VX:Fegn089526 分钟前
计算机毕业设计|基于springboot + vue图书商城系统(源码+数据库+文档)
java·数据库·vue.js·spring boot·后端·课程设计
求学中--1 小时前
MySQL 数据库完整操作命令与使用指南
数据库·sql·mysql·oracle
DKunYu2 小时前
误删数据库表导致出现1146报错
数据库
惜分飞3 小时前
sql server 事务日志备份异常恢复案例---惜分飞
前端·数据库·php
sunddy_x4 小时前
MySQL入门
数据库·mysql
_Minato_4 小时前
数据库知识整理——数据库设计的步骤
数据库·经验分享·笔记·软考
坐吃山猪4 小时前
BrowserUse14-源码-ScreenShot模块-整理
linux·数据库·python
廋到被风吹走4 小时前
【数据库】【MySQL】各种 JOIN 的特点及应用场景
数据库·mysql
@nengdoudou4 小时前
KingbaseES 实现 MySQL 函数 DATEDIFF
数据库·mysql