First, have a text file with some values you would like to BULK INSERT.
The example below is a text file called ‘animals.txt’ with contents of:
cat dog fish bird snake
The SQL snippet:
CREATE TABLE #TempTable (Pets CHAR(16)); BULK INSERT #TempTable FROM 'C:\SQLTesting\animals.txt' WITH ( DATAFILETYPE= 'char', FIELDTERMINATOR=',', ROWTERMINATOR='\r' -- Carriage Return ); SELECT Pets FROM #TempTable; -- Remove our temporary table. DROP TABLE #TempTable;
CREATE TABLE:
https://msdn.microsoft.com/en-us/library/ms174979.aspx
BULK INSERT: