the important thing is not to stop questioning

导航

 
--sql 2000
select 序号 = (select count(1) from tb where 学号 < t.学号) + 1,学号 ,姓名 from tb t
 
--sql 2005
select 序号 = row_number() over(order by 学号),学号 ,姓名 from tb
posted on 2015-10-27 16:44  qook  阅读(203)  评论(0)    收藏  举报