Sql Server临时表中插入标示列

select 
ROW_NUMBER() over( order by sort_id asc) as rows,* 
into #tmp_tb
from tb_district

其中sort_id为您原表的排序列。

tb_district为要操作的表。

 

posted @ 2013-04-03 13:57  A light heart lives long  阅读(349)  评论(0编辑  收藏  举报