rowid是该数据行的物理地址
使用rownum

解决方案 »

  1.   

    选择390到400间的10条记录
    select * from ( select rownum id,tb.* from tb where rownum<400) where id>=390;
      

  2.   

    很好!
    但有个问题不理解,就是
    假如下如SQL语句返回记录数为7条
    select ID,rownum from tUserInfo where status = 1;
    为什么:
    select ID,rownum from tUserInfo where status = 1 and rownum < 10 ;
    select ID,rownum from tUserInfo where status = 1 and rownum < 4 ;是有记录返回的
    而下面三个SQL语句
    select ID,rownum from tUserInfo where status = 1 and rownum > 1;
    select ID,rownum from tUserInfo where status = 1 and (rownum > 1 and rownum < 4);
    select * from (select ID,rownum from tUserInfo where status = 1) where (rownum > 1 and rownum < 4)
    都是没有记录返回呢?
      

  3.   

    不能用select * from tbname where rownum > n或者
    select * from tbname where rownum >n and rownum <m;这样
    select * from (select ID,rownum  num from tUserInfo where status = 1) where (num > 1 and num < 4);
      

  4.   

    哦!
    谢谢 bzszp(SongZip)兄弟啊,
    问题解决,感谢各位的帮忙!
      

  5.   

    看见这里问分页的问题比较多,推荐到这里看看
    http://www.cnoug.org/bin/ut/threaded_show.cgi?tid=38&pid=77