Two similar SQL-like query results that were never noticed before
Select A.*, case when X.resno was 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;
650) this.width=650; "Src=" https://s1.51cto.com/wyfs02/M01/99/C2/wKiom1lL6wOQyyVXAACBSqLeMcg654.png-wh_500x0-wm_ 3-wmp_4-s_1561242372.png "title=" Qq20170623000452.png "alt=" Wkiom1ll6woqyyvxaacbsqlemcg654.png-wh_50 "/>
Select A.*, case when X.resno was 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;
650) this.width=650; "Src=" https://s2.51cto.com/wyfs02/M02/99/C2/wKiom1lL6xTjdnVLAACIy6VHngw446.png-wh_500x0-wm_ 3-wmp_4-s_1524035685.png "title=" Qq20170623000518.png "alt=" Wkiom1ll6xtjdnvlaaciy6vhngw446.png-wh_50 "/>
Who knows what the situation is? Welcome message
This article is from the lava blog, so be sure to keep this source http://lavasoft.blog.51cto.com/62575/1941135
Two similar SQL-like query results that were never noticed before