declare @sql varchar(1000),@fd varchar(1000)
declare #temp cursor for select name from syscolumns where id=object_id('你要复制的表')
select * into 新表 from 你要复制的表
open #temp
fetch next from #temp into @fd
while @@fetch_status=0
begin
set @sql='if (select sum('+@fd+') from 新表)=0'
+char(13)+'alter table 新表 drop '+@fd
exec(@sql)
fetch next from #temp into @fd
end
close #temp
deallocate #temp