现在的位置: 首页 > 综合 > 正文

Sql Server临时表中插入标示列

2012年11月09日 ⁄ 综合 ⁄ 共 112字 ⁄ 字号 评论关闭
select 
ROW_NUMBER() over( order by sort_id asc) as rows,* 
into #tmp_tb
from tb_district

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

tb_district为要操作的表。

 

抱歉!评论已关闭.