试试不用临时表,直接bcp中写带列名的查询语句.exec master..xp_cmdshell 'bcp "select ''aa'' ''aa'',''bb'' ''bb'' union all select aa,bb from CSDN.dbo.[table] " ......