当前位置:Gxlcms > 数据库问题 > 两个相似SQL的查询结果,以前未曾注意

两个相似SQL的查询结果,以前未曾注意

时间:2021-07-01 10:21:17 帮助过:17人阅读

a.sysno=1;

技术分享


select a.*, case when x.resno is null then 0 else 1 end as isown from prm_res a

left join 

(select b.resno from prm_res b

inner join prmg_role_res c on b.resno=c.resno

inner join prmg_acct_role d on d.roleno=c.roleno and d.acct=1

) as x

on a.resno=x.resno and a.sysno=1;

技术分享


谁知道啥情况?欢迎留言

本文出自 “熔 岩” 博客,请务必保留此出处http://lavasoft.blog.51cto.com/62575/1941135

两个相似SQL的查询结果,以前未曾注意

标签:mysql   join   

人气教程排行