Sql Server临时表中插入标示列
select ROW_NUMBER() over( order by sort_id asc) as rows,* into #tmp_tb from tb_district
其中sort_id为您原表的排序列。
tb_district为要操作的表。
select ROW_NUMBER() over( order by sort_id asc) as rows,* into #tmp_tb from tb_district
其中sort_id为您原表的排序列。
tb_district为要操作的表。