1.
Select top M * into temporary table (or table variable) from tablename order by columnname -- insert top M pen
Set rowcount n
Select * from Table variable order by columnname DESC
2.
Select Top N * from
(Select top M * From tablename order by columnname)
Order by columnname DESC
3. If there are no other identity columns in tablename, then:
Select Identity (INT) id0, * into # temp from tablename
N to M statements:
Select * from # temp where id0> = N and id0 <= m
If you report an error when executing the Select Identity (INT) id0, * into # temp from tablename statement, this is because the select into/bulkcopy attribute in the middle of your DB is not enabled and must be executed first:
Exec sp_dboption your DB name, 'select into/bulkcopy', true
4. If the table contains the identity attribute, it is simple:
Select * From tablename where identitycol between N and m