EXEC master..xp_cmdshell 'bcp "select a.name 列 from 库名.dbo.syscolumns a,库名.dbo.sysobjects d where a.id=d.id and d.xtype='U' and d.name=''表名''" queryout f:\boc\DT.txt -c -Sservername -Usa -Ppassword'
EXEC master..xp_cmdshell 'bcp "select a.name 列 from 库名.dbo.syscolumns a,库名.dbo.sysobjects d where a.id=d.id and d.xtype='U' and d.name=''表名''" queryout f:\boc\DT.txt -c -Sservername -Usa -Ppassword'