添加多行相同的数据

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

原文地址:https://www.cnblogs.com/PerfectBeauty/p/9253052.html