the bcp command-line Utility
You use the bcp (Bulk copy program) tool to address the bulk movement of data. This utility was 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 (| |)] [-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-a Re the–f and–l options. These options specify the first and last row of data to be loaded from a file, which are especially helpful in Large batches. The–t option allows you to specify the field terminator this separates data elements in an ASCII file. The–e option allows you-import data into SQL Server fields is defined with identity properties.
Tip
The BULK INSERT T-SQL statement and SSIS is good alternatives to bcp. The BULK INSERT statement is limited-loading data into SQL Server, but it's an extremely fast tool for loading data. SSIS is a sophisticated GUI this allows for both data import and data export, and it have capabilities that go well beyond Bcp.
BCP command usage in SQL Server