创建新表把原旧表的数据全部导入到新表中:
if exists(select * from sysobjects where name= 'a' )
begin
insert into a select * from b where ...
end
esle
begin
select * into a from b where ...
end
转载于:https://blog.51cto.com/liguo125/387251