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

原文地址:https://www.cnblogs.com/johnsmith/p/2167619.html