declare @n nvarchar(1000)
set @n=' '
select @n =@n + (case name when '承运商' then ' ' --不要的字段名
when 'ID' then ' ' --不要的字段名
else name + ',' + ' ' end)
from sys.all_columns
where object_id =OBJECT_ID('运输')
set @n=LEFT(@n,len(@n)-1)+' '
set @n='insert into 插入表格('+ @n +')' + 'select '+ @n +' from 被复制表格'
exec(@n)