SQL查询结果 添加序号列解决方法有以下两种
select ROW_NUMBER() OVER (ORDER BY a.id ASC) AS xh,a.* from dbo.ggaplantb a
select RANK() OVER (ORDER BY a.id ASC) AS xh,a.* from ggaplantb a
SQL查询结果 添加序号列解决方法有以下两种
select ROW_NUMBER() OVER (ORDER BY a.id ASC) AS xh,a.* from dbo.ggaplantb a
select RANK() OVER (ORDER BY a.id ASC) AS xh,a.* from ggaplantb a