oracle查询问题,加上 rownum 除了一堆问题
selectt.*,rownumrnfrom(selectsz.idid,bj.bmbjmc,sz.jcd_idjcid,xqb.zcmczcmc,bj.fjd_idfj...
select t.*, rownum rn from (select sz.id id, bj.bm bjmc, sz.jcd_id jcid, xqb.zcmc zcmc, bj.fjd_id fjdid, sz.bj_id bjid, bj.nj_id njid from TB_JW_PK_BJPKJPSZB sz inner join TB_XXZY_BJXXB bj on sz.bj_id = bj.id and bj.fjd_id in (select jg.id from TB_JXZZJG jg where jg.qxm like (select yx.qxm from TB_JXZZJG yx where yx.id = 1001000000000082) || '%') inner join TB_JW_PK_KSXQB xqb on sz.ksxq_id = xqb.id where sz.sfpk = 0 and sz.pkzb_id = 1001000016736944 order by bj.bm) twhere rownum < 10 这是我的sql,这样查询是有数据的,如果去掉 最后的where rownum < 10就查不出数据了,为什么呢??数据库是oracle10G
展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询