兩個類似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
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;
誰知道啥狀況?歡迎留言