select t1.aa,t1.bb,t1.cc,
(select dd from zhj where xh=(select top 1 pp from xz where xh=110)),t1.ee,
(select top 1 qq from xz where xh=110),
(select top 1 ww from xz where xh=110)
from clzd as t1
where t1.ff in (select bh from xz where xh=110)
请教怎么优化这个句子?
(select dd from zhj where xh=(select top 1 pp from xz where xh=110)),t1.ee,
(select top 1 qq from xz where xh=110),
(select top 1 ww from xz where xh=110)
from clzd as t1 join xz on t1.ff=xz.bh
where xz.xh=110
from clzd t1
join xz t2 on t1.ff=t2.bh
join zhj t3 on t3.xh=t2.pp
where t2.xh=110
sql下可以通过
用inner join