试试吧:
按‘ID’字段的顺序,从imhd表中取第10-20行的记录
Select * from
imhd,
(Select 'id'=max(id) From (select top 10 * from imhd order by id)as #temp1) as #temp2,
(Select 'id'=max(id) From (select top 20 * from imhd order by id)as #temp3) as #temp4
where imhd.id>=#temp2.id and imhd.id<=#temp4.id