SQL Server使用BCP导入导出数据

2014-11-24 08:34:07 ? 作者: ? 浏览: 2

SQL Server使用BCP导入导出数据
命令行下:
bcp pubs.dbo.table1 in "d:\\t1.dat" -S . -U "sa" -P "123" -n
bcp pubs.dbo.table1 out "d:\\t1.dat" -S . -U "sa" -P "123" -n
或调用SQL过程
[sql]
exec master..xp_cmdshell 'bcp pubs.dbo.table1 in "d:\\t1.dat" -S . -U "sa" -P "123" -n' www.2cto.com
exec master..xp_cmdshell 'bcp pubs.dbo.table1 out "d:\\t1.dat" -S . -U "sa" -P "123" -n'
msdn:http://msdn.microsoft.com/zh-cn/library/ms162802. aspx
作者 qq752923276
-->

评论

帐  号: 密码: (新用户注册)
验 证 码:
表  情:
内  容: