sqlsqler2005下读取某分页段记录数
sqlsqler2005版本增加类似Oracle一样的伪列方法 ROW_NUMBER()OVER(ORDER BY [id] ASC)
id为表的自增列
例如:读取表MASTERDATA中10到20行的记录数
select * from (select (ROW_NUMBER()OVER(ORDER BY [id] ASC)) as ROWID,* from MASTERDATA) as d where d.ROWID BETWEEN 10 AND 20