sql server BCP 工具的使用

EXEC master..xp_cmdshell  'bcp <database-name> <table-name> in  <csv-file> -c -t, -S <server-name> -U <username> -P <password>'


其中:

EXEC master..xp_cmdshell : master..xp_cmdshell 是master数据库的存储过程,主要用来在管理器里面执行操作系统的一些命令

in: 代表是 导入

<csv-file>: 你CSV文件的绝对路径 如(H:\1.csv)


你可能感兴趣的:(sqlserver,BCP)