兩個類似SQL的查詢結果,之前不曾注意

兩個類似SQL的查詢結果,之前不曾注意ide



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

left join orm

(select b.resno from prm_res bblog

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

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

) as xio

on a.resno=x.resno where a.sysno=1;class

wKiom1lL6wOQyyVXAACBSqLeMcg654.png-wh_50


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

left join im

(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;

wKiom1lL6xTjdnVLAACIy6VHngw446.png-wh_50


誰知道啥狀況?歡迎留言

相關文章
相關標籤/搜索