| |
|
What is BCP and its syntax with detail Classified Posted on 14 Sep 2011 Home >> DataBase >> SQL Query >> What is BCP and its syntax with detail |
BCP is a utility that installs with SQL Server and can assist with large data transfers.BCP utility in SQL Server enables you to import bulk data into a table or export it from a table into a file. It also supports several options that define how data will be exported, where it will be imported and which data will be loaded.BCP is a command-line tool that uses the Bulk Copy Program (BCP) API.
Syntax of BCP:-
bcp < table_name > < direction > < file_name > < options >
Now these options in a little more detail
(1) we can specify either an entire table to copy or query.
(2) here we use in for import and out for export data.
(3) file_name is the full path to the file.
(4) options allow you to specify parameters for the bulk operation.
Or
bcp
databaseName.Schema.TableName *or* "Query"
in, out, *or* queryout
-S ServerName\instanceName
-U userName -P password *or* -T
-c *or* -n *or* specify storage information for each column | |
|
|
|
|