O'Reilly logo

Microsoft® SQL Server 2012 Unleashed by Alex T. Silverstein, Chris Gallelli, Paul T. Bertucci, Ray Rankins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

The bcp Command-Line Utility

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" {indata_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]] ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required