BULK INSERT [Database]..[TableName]
FROM 'D:\test.txt' -- Path of text file
FIRSTROW = 1
,BATCHSIZE = 10000
,FIELDTERMINATOR = ','
,ROWTERMINATOR = '\n'
,LASTROW = 20
Here is the description of Keywords used:
Specifies the number of the first row to load. The default is the first row in the specified data file.
Specifies the number of rows in a batch. Each batch is copied to the server as one transaction. If this fails, SQL Server commits or rolls back the transaction for every batch. By default, all data in the specified data file is one batch.
Specifies the field terminator to be used for char and widechar data files. The default field terminator is \t.
Specifies the row terminator to be used for char and widechar data files. The default row terminator is \r\n (newline character).
Specifies the number of the last row to load. The default is 0, which indicates the last row in the specified data file.