0% found this document useful (0 votes)
28 views4 pages

Bulk Insert

The BULK INSERT syntax loads large amounts of data from an external file into a SQL Server table. It takes the file path as the first argument, followed by optional clauses within brackets to specify the data type, field terminator, and row terminator for proper parsing of the external data file.

Uploaded by

Ammar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views4 pages

Bulk Insert

The BULK INSERT syntax loads large amounts of data from an external file into a SQL Server table. It takes the file path as the first argument, followed by optional clauses within brackets to specify the data type, field terminator, and row terminator for proper parsing of the external data file.

Uploaded by

Ammar
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 4

BULK INSERT

SYNTAX
BULK INSERT Employee
FROM 'C:\Data\EmployeeData_c.dat'
[WITH
 (
    DATAFILETYPE = 'char',
    FIELDTERMINATOR = ',',
    ROWTERMINATOR = '\r\n'
  )]
ARGUMENTS
FORMAT :- Specifies the type of file that we are trying to access.
Eg: CSV, TXT, DAT…
CSV : Comma Separated Values.
FIELDQUOTE :- Specifies a character that will be used as the quote character in the CSV file. If
not specified, the quote character (") will be used as the quote character.
FIRSTROW :- Specifies the number of the first row to load. The default is the first row in the
specified data file.
LASTROW :- Specifies the number of the last row to load. The default is 0, which indicates the
last row in the specified data file.
ARGUMENTS (CONT.)
FEILDTERMINATOR :- Specifies the field terminator to be used for char and widechar data files.
The default field terminator is the '\t' (tab character).
ROWTERMINATOR :- Specifies the row terminator to be used for char and widechar data files.
The default row terminator is the '\n' (newline character).

You might also like