Row_Number()用法

SELECT ROW_NUMBER() OVER (ORDER BY EMPID ASC) AS ROWID, * FROM EMPLOYEE

select * from (select row_number() over(order by Class) as 'myid',* from studb) mytb where mytb.myid>2 and mytb.myid<5

参考:http://blog.sina.com.cn/s/blog_5f92e8c50100kfnp.html

posted on 2011-09-05 15:46  啊風  阅读(282)  评论(0编辑  收藏  举报