SQL 2005的row_number,(oracle 的 rownum)
SQL 2005终于提供了类似在oracle中rownum的功能。可惜相比oracle,实现还是不那么优美。
e.g:
select * from (select *, row_number() over (order by name) as row ) a where row between 10 and 20
为什么不是?
select *, row_number() over (order by name) as row a where row between 10 and 20