select top 50000 * from table_name order by IDselect top 50000 * from table_name where ID>ALL (select top 50000 ID from table_name order by ID) order by ID select top 50000 * from table_name where ID>ALL (select top 2*50000 ID from table_name order by ID) order by ID 

解决方案 »

  1.   

    select top 50000 * from table_name  where ID>
    ( select MAX(ID) ID from (select top 50000 ID from table_name  order by ID) CC) order by ID这样或许效率高些
      

  2.   

    oracle数据库可以使用 row_number()
    如下:select * from 
             ( select row_number() over(order by id) t,table_name.* ) k
             where k.t>50000 and k.t<=100000
      

  3.   

    SQL SERVER的话就只能用:select top 50000 * from table_name  where ID>
    ( select MAX(ID) ID from (select top 50000 ID from table_name  order by ID) CC) order by ID这个了?
      

  4.   

    top是sql server的命令
    oracle的rownum与其有相同的功效rownum 相当于一个是一个行号.
    相当于我给每一行添加一个id号.然后利用它来排序,并取得前几行.
      

  5.   

    如: 
      SELECT * FROM table1 where rownum < 100  order by myid