标签:
用的是数据库sqlserver2000,唉,有点老了,好处是到处都有,安装方便。
select ( select count(*) from temp_gzsphzb as t1 where spid <=t2.spid) as xh ,* from temp_gzsphzb as t2order by 1
留做纪念!
sqlserver2000 在查询时产生序号列的办法
原文地址:http://www.cnblogs.com/alasunny/p/5478310.html