SQL SERVER ->> BCP导出数据到平面文件
--开启xp_cmdshell sp_configure ‘show advanced options’, 1; GO RECONFIGURE; GO sp_configure ‘xp_cmdshell’, 1; --Switch on specific functionality GO RECONFIGURE; GO --Tab作为行分隔符,\n作为断行符 导出到H盘 EXECUTE master.dbo.xp_cmdshell 'bcp "SELECT TOP 20 PERCENT * FROM MyDB.dbo.table_name" queryout H:\table_name.dat -c -T'