用sql求得每行行号

第一种方法
Select (Select Count(FA) From TableName Where FA <= A.FA) As 行号 , * From TableName A

第二种方法
select identity(int,1,1) as iid,* into #t from  table
select * from #t
drop table #t
原文地址:https://www.cnblogs.com/eebb/p/820462.html