select * from table where rowid <= 3
minus
select * from table where rowid <= 2;

解决方案 »

  1.   

    我也被你搞迷糊了:select * from table where rownum <= 3
    minus
    select * from table where rownum <= 2;
      

  2.   

    呵呵,doulikeme(来去无踪) 是今天给那个贴子给气糊涂了吧.
      

  3.   

    没有没有 总不能动不动就说垃圾吧 唉~~还有种办法:select * from (select rownum,a.* table a where rownum<=3 order by rownum desc) where rownum<=1;
      

  4.   

    select * from 表 where rowid=(select max(rowid) from 表 where rownum<4)
      

  5.   

    select * from 表 where rowid=(select max(rowid) from 表 where rownum<4)这个不对吧 rowid可不一定是最大的啊
      

  6.   

    select * from 表 where rowid=(select max(no) from (select rowid no from 表 where rownum<4))
      

  7.   

    select * from (select rownum no,表.* from 表 where rownum<4) where no=3;
      

  8.   

    我觉得不排序的话 用rowid是可以的
    select * from 表 where rowid=(select max(rowid) from 表 where rownum<4)
    这个应该是最快的
      

  9.   

    select * from 表 where rowid=(select max(rowid) from 表 where rownum<4)
    这句就对了,没必要用我后面的几种。