两个相似SQL的查询结果,以前未曾注意
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 where 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;
谁知道啥情况?欢迎留言
免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。