BCP command usage in SQL Server
内容导读
互联网集市收集整理的这篇技术教程文章主要介绍了BCP command usage in SQL Server,小编现在分享给大家,供广大互联网技能从业者学习和参考。文章包含1691字,纯文字阅读大概需要3分钟。
内容图文
![BCP command usage in SQL Server](/upload/InfoBanner/zyjiaocheng/453/ffc2bb9da46544f9904a27fdcc5758e2.jpg)
You use the bcp (bulk copy program) tool to address the bulk movement of data. This utility is bidirectional, allowing for the movement of data into and out of a SQL Server database.
bcp uses the following syntax:
bcp [database_name.] schema.{table_name | view_name | "query" {in
data_file | out data_file | queryout data_file | format nul}
[-a packet_size] [-b batch_size] [-c]
[-C { ACP | OEM | RAW | code_page } ]
[-d database_name] [-e err_file] [-E]
[-f format_file] [-F first_row] [-h"hint [,...n]"]
[-i input_file] [-k] [-K application_intent]
[-L last_row] [-m max_errors] [-n]
[-N] [-o output_file]
[-P password] [-q] [-r row_term]
[-R] [-S [server_name[\instance_name]]
[-t field_term] [-T] [-U login_id]
[-v] [-V (80 | 90 | 100 )] [-w]
[-x]
/?
Some of the commonly used options—other than the ones used to specify the database, such as user ID, password, and so on—are the –F and –L options. These options allow you to specify the first and last row of data to be loaded from a file, which is especially helpful in large batches. The –t option allows you to specify the field terminator that separates data elements in an ASCII file. The –E option allows you to import data into SQL Server fields that are defined with identity properties.
Tip
The BULK INSERT T-SQL statement and SSIS are good alternatives to bcp. The BULK INSERT statement is limited to loading data into SQL Server, but it is an extremely fast tool for loading data. SSIS is a sophisticated GUI that allows for both data import and data export, and it has capabilities that go well beyond bcp.
BCP command usage in SQL Server
标签:
本文系统来源:http://www.cnblogs.com/IcanFixIt/p/4654801.html
内容总结
以上是互联网集市为您收集整理的BCP command usage in SQL Server全部内容,希望文章能够帮你解决BCP command usage in SQL Server所遇到的程序开发问题。 如果觉得互联网集市技术教程内容还不错,欢迎将互联网集市网站推荐给程序员好友。
内容备注
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 gblab@vip.qq.com 举报,一经查实,本站将立刻删除。
内容手机端
扫描二维码推送至手机访问。