inner join 和 left join
来源:互联网 发布:考研作息知乎 编辑:程序博客网 时间:2024/04/28 17:45
select
v.usercode,
t.menucode,
t.menuname,
t.linkpage,
t.menulevel,
t.ordernum,
t.parentcode,
t.icoindex,
t.selicoindex,t.ismenu,t.pageflag,t.isshow,t.issysmenu,t.isvalid,t.sourcelevel
from DFO.SYS_MENUINFO t
inner join (
select usercode,menucode from (
select
a.usercode,
b.menucode
from sys_userrole a
inner join DFO.Sys_Rolepower b on a.rolecode = b.rolecode
left join DFO.sys_roleinfo c on a.rolecode = c.rolecode
where usercode = 'yh00000007' and nvl(c.isvalid,'0')='1'
)
group by usercode,menucode
) v
on t.menucode = v.menucode
WHERE 1=1
AND ISSHOW ='1'
AND ISVALID ='1'
AND menulevel ='1'
ORDER BY menucode,ordernum
v.usercode,
t.menucode,
t.menuname,
t.linkpage,
t.menulevel,
t.ordernum,
t.parentcode,
t.icoindex,
t.selicoindex,t.ismenu,t.pageflag,t.isshow,t.issysmenu,t.isvalid,t.sourcelevel
from DFO.SYS_MENUINFO t
inner join (
select usercode,menucode from (
select
a.usercode,
b.menucode
from sys_userrole a
inner join DFO.Sys_Rolepower b on a.rolecode = b.rolecode
left join DFO.sys_roleinfo c on a.rolecode = c.rolecode
where usercode = 'yh00000007' and nvl(c.isvalid,'0')='1'
)
group by usercode,menucode
) v
on t.menucode = v.menucode
WHERE 1=1
AND ISSHOW ='1'
AND ISVALID ='1'
AND menulevel ='1'
ORDER BY menucode,ordernum
- INNER JOIN和left JOIN
- inner join和left join
- inner join 和 left join
- INNER JOIN 、 LEFT JOIN 和 RIGHT JOIN
- inner join、Left Join和Right join
- Left Join和Inner Join的体会
- left join和inner join举例
- left join 和 inner join 区别
- left join 和 inner join 以及 fetch
- Left/right join 和inner join 区别
- inner join和left join的区别
- left join和right join和inner join的区别
- left join 和 right join 和 inner join区别
- LEFT JOIN 、RIGHT JOIN和INNER JOIN 运算
- Inner join , Left join 和Right join 的区别
- left join 和 right join ,inner join的区别
- left join ,right join 和 inner join 的区别
- LEFT JOIN ,RIGHT JOIN 和INNER JOIN 的区分
- BASH fork 炸弹 简述
- HeavyBooks(TCO2012Round2B-2)
- Extjs学习笔记4-propertyGrid
- mysql 添加用户和授权
- hdu1421n中选k个不相邻数的最小值
- inner join 和 left join
- 自行控制loadrunner的socket协议性能测试
- 2.4G无线遥控器鼠标解决办法
- 利用lipo编译合并iPhone模拟器和真机通用的静态类
- Android网络编程—同时上传参数和文件到服务器
- 同为问答网站 Quora能否成为盈利版维基百科
- 第13周任务2.2
- SQL语句修改字段属性
- JNDI全攻略