sqlserver2000 在查询时产生序号列的办法

时间:2020-12-13 04:42:28

用的是数据库sqlserver2000,唉,有点老了,好处是到处都有,安装方便。


select ( select count(*) from temp_gzsphzb as t1 where spid <=t2.spid) as xh ,* from temp_gzsphzb as t2
order by 1

 

留做纪念!