如何选择出指定行之间的纪录??大虾帮忙~

 所属目录:Java   |   类型:技术问答   |   时间:2007-05-21
 问题:

请问在sqlserver中用怎样的sql语句可以选择出指定行的纪录?例如:第10行到第20行之间的纪录

· 网友精彩回答:

发表者:tangqijun199

select   *,identity(int,1,1)   as   nxh   into   table2   from   table1  
  加一个序号列才可以  
   
  如果不加有点麻烦  
   
  select   a.*   from    
  (select   top   20   *   from   table1)   a   left   join    
  (select   top   10   *   from   table1)   b   on   a.主健1=b.主健1   and   a.主健2=b.主健2……  
  where   b.主健1   is   null  
   
 

.
处理 SSI 文件时出错
© 2006-2008 All Rights Reserved