比如使用:
SELECT [eId] as 申请编号, [eUid] as 申请人编号,(select uRealname from right_user where uid=approve_STable.eUid) as 申请人 from approve_STable
经常使用这样的语句来达到效果,但不懂它的效率如何,如果不好有没有替换的方法?
------解决方案--------------------
--效率不高
--改成
select a.[eId] as 申请编号,
a.[eUid] as 申请人编号,
b.uRealname as 申请人
from approve_STable a
inner join right_user b
on a.eUid = b.uid