用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
posted @ 2008-04-05 12:22  jetz  阅读(1633)  评论(0编辑  收藏  举报