Select (Select sum(1) from Table1 where ID <= a.ID) as xuhao,* from Table1 a ---- 来自jb51.cc @H_403_4@ 原文链接:https://www.f2er.com/mssql/530180.html
Select (Select sum(1) from Table1 where ID <= a.ID) as xuhao,* from Table1 a ---- 来自jb51.cc