你用的oracle哪个版本?order by子句只有在8i或以上版本才能在子查询中使用

解决方案 »

  1.   

    是不是先排序,然后取某段
    例:
    select rownum,bbb,ccc from (select *  from a1 order by bbb) where rownum<21
    minus
    select rownum,bbb,ccc from (select *  from a1 order by bbb) where rownum<11;
      

  2.   

    sql写错了,现在改正
    select * from A where no<=nend minus select * from B where no<nstart
      

  3.   

    是不是先排序,然后取某段
    例:
    select rownum,bbb,ccc from (select *  from a1 order by bbb) where rownum<21
    minus
    select rownum,bbb,ccc from (select *  from a1 order by bbb) where rownum<11;
      

  4.   

    为什么“order by子句只有在8i或以上版本才能在子查询中使用”?
    order by子句是基本子句,在7.3.3上也可使用呀!
      

  5.   

    抱歉,我看错了内容,在子查询中使用order by子句没有在7版上使用过,不过记得在8版上使用过的,大概是8.1.6版。