用sql语句生成序号

  select   (select   1+count(*)   from   tablename   where   业绩>a.业绩)   as   排名,业绩,名称   from   tablename   a   order   by   业绩   desc,名称   

        业绩是关键字,这样就可以生成新编号而不破坏原来的数据库。


参见:
http://www.80diy.com/home/20010725/20/209385.html
原文地址:https://www.cnblogs.com/jetz/p/1138146.html