方法:ROW_NUMBER() over(order by getdate()) AS num

使用案例 :

select * From (select  ROW_NUMBER() over(order by getdate()) AS num  , * From Z) AS c where num >3 and num < 15
理解:
对所有的数据进行从1到N的排列顺序可以用来进行数据筛选

 

posted on 2017-03-03 10:17  黎明前的夜  阅读(916)  评论(0编辑  收藏  举报