使用临时表:

select   id=identity(int,1,1),value   into   #temp   from   YourTable  
  select   *   from   #temp  
  drop   table   #temp  

 

取得第11到20行记录:

select   IDENTITY(int,   1,1)   AS   ID_Num,*   into   #temp   from   表  
  select   *   from   #temp   where   ID_Num>10   and   ID_Num<=20

 

或  
  SELECT   Top   @PageSize   *  
            FROM   T  
          WHERE   SortField   NOT   IN   (SELECT   TOP   @PageSize   *   @Pagei   SortField  
                                                              FROM   T  
                                                      ORDER   BY   SortField  
                                                          )  
    ORDER   BY   SortField

 

REF:http://topic.csdn.net/t/20021022/21/1116380.html

 

相关文章:

  • 2021-11-03
  • 2021-12-10
  • 2021-06-20
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2022-12-23
  • 2021-12-15
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2022-02-22
  • 2022-12-23
  • 2022-12-23
  • 2021-08-05
相关资源
相似解决方案