WITH tempTable AS( --复杂查询语句)
SELECT * FROM (select ROW_NUMBER() Over( order by xxx) as rowNum, * from tempTable) as tempTable1where rowNum> 0 and rowNum<30