添加多行相同的数据

if object_id('tempdb..#temp_table') is not null

Begin
drop table #temp_table
End
SELECT * INTO #temp_table FROM AAA  
UPDATE #temp_table set CorporationKeyId=NULL, CityKeyId=NULL
alter table #temp_table drop column Id;
INSERT into AAA SELECT * from #temp_table

posted @ 2018-07-02 11:34  慢慢走向架构师  阅读(291)  评论(0编辑  收藏  举报