您的位置:首页 > 数据库

SQLServer使用BCP导入导出数据

2012-07-14 15:22 351 查看
命令行下:

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过程

exec master..xp_cmdshell 'bcp pubs.dbo.table1 in "d:\\t1.dat" -S . -U "sa" -P "123" -n'
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
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: