获取记录的行号

--2005
select rn=row_number()over(order by 专业号),* from tb
--2000
select rn=(select count(1) from tb where 专业号<=t.专业号),* from tb t

 

posted on 2010-11-26 20:02  peter_zhang  阅读(115)  评论(0编辑  收藏  举报