sql server导出查询到excel
云起网2018-12-04
云服务426
--导出查询的情况
exec master..xp_cmdshell 'bcp "select * from user" queryout "c:\test.xls" -c -S"." -U"sa" -P"sa"'
很赞哦! ()
--导出查询的情况
exec master..xp_cmdshell 'bcp "select * from user" queryout "c:\test.xls" -c -S"." -U"sa" -P"sa"'