sql server导出表数据(TXT文件)

EXEC master..xp_cmdshell 'bcp "select * from HANSUI.dbo.SRB在庫マスタ" queryout "F:\share\test_jwj\tt.txt" -c -S"172.16.1.1" -U"sa" -P"1qazXSW@"'


EXEC sp_configure 'show advanced options',1; RECONFIGURE; EXEC sp_configure 'xp_cmdshell',1;RECONFIGURE;

猜你喜欢

转载自www.cnblogs.com/-jwj/p/11505535.html