select * from tab where rownum<3;

解决方案 »

  1.   

    完全同意
    select * from tab where rownum<3;
      

  2.   

    select * from tab where rownum<3
    where rownum<=2
    楼上的都对!
      

  3.   

    where rownum<=2
    效率高!
      

  4.   

    select * from tab where rownum<3;
      

  5.   

    呵呵 sybase里要怎么写
      

  6.   

    [Q]抽取从N行到M行的记录,如从20行到30行的记录
    [A]select * from (select rownum id,t.* from table t where …… 
    and rownum <= 30) where id > 20;
      

  7.   

    select * from table where rownum<=2