Select no=Identity(int,1,1),* Into #temptable From TableName --Order By SortField Select * From #temptable --Where no>=6 And no < 10 Drop Table #temptable