康老师

如何使用SQLServer命令BCP导入导出EXCEL数据

2021-04-11 16:39:11
相关推荐

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" http://www.2cto.com

exec master..xp_cmdshell "bcp pubs.dbo.table1 out "d:\t1.dat" -S . -U "sa" -P "123" -n"

阅读剩余内容
网友评论
相关阅读
小编推荐