子查询中使用order by报错? select t.yjfk_id,t.fid,t.yhid,jlcjr yhxm,t.lxfs,t.jlcjsj,t.bt,t.nr,(select count(0) from epdm_yjfk where fid=t.yjfk_id) hfs ,(select jlcjsj from EPDM_YJFK where fid=t.yjfk_id and fid!='0' and rownum=1 order by jlcjsj desc) zhhfsjfrom EPDM_YJFK t where t.fid='0' and t.yhid='1003' order by jlcjsj desc
select t.yjfk_id,
t.fid,
t.yhid,
jlcjr yhxm,
t.lxfs,
t.jlcjsj,
t.bt,
t.nr,
(select count(0) from epdm_yjfk where fid = t.yjfk_id) hfs,
(select max(jlcjsj)
from EPDM_YJFK
where fid = t.yjfk_id
and fid != '0') zhhfsjfrom EPDM_YJFK t
where t.fid = '0'
and t.yhid = '1003'
order by jlcjsj desc
------解决方案--------------------