Import CSV File Into SQL Server Using SQL Server Management Studio

In this article, we learn how to import CSV files into SQL server using SQL server management Studio

  • Log in to your database using SQL Server Management Studio.
  • Right-click the database and select Tasks -> Import Data.

Import CSV file into SQL server using SQL server management Studio

Then click the Next button.

Import CSV file into SQL server using SQL server management Studio

From Data Source, select Flat File Source and then use the Browse button to select the CSV file.

Import CSV file into SQL server using SQL server management Studio

Here is my sample CSV file that has some dummy data.

Import CSV file into SQL server using SQL server management Studio

Then select Advanced, and as per your CSV data size is required to set column width.

Import CSV file into SQL server using SQL server management Studio

Then click the Next button.

Import CSV file into SQL server using SQL server management Studio

Destination select as SQL Server Native Client and Enter the Server name; 

Enter SQL Server Authentication data and click the Next button.

Import CSV file into SQL server using SQL server management Studio

Then click the Next button.

Import CSV file into SQL server using SQL server management Studio

Then click the Next button.

Import CSV file into SQL server using SQL server management Studio

Then click the Finish button.

Import CSV file into SQL server using SQL server management Studio

CSV file data imported successfully in SQL database table. The table is created as per the CSV file name.

Select the database and execute a query.

Import CSV file into SQL server using SQL server management Studio

Enjoy!


Similar Articles