SQL 直接汇出 Excel 表 exec master..xp_cmdshell 'bcp "select * from [BookShop].[dbo].[tb_Books] where [UnitPrice]=22" queryout d:temp.xls -c -q -S"." -U"sa" -P""'