第一种:
Select no=Identity(int,1,1),* Into #temptable From TableName --Order By SortField
Select * From #temptable --Where no>=6 And no
第二种
select *,(select count(*) from 表名 where 列<=a.列 and 条件) as 行号
from 表名 a where 条件 order by 表名