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.
Then click the Next button.
From Data Source, select Flat File Source and then use the Browse button to select the CSV file.
Here is my sample CSV file that has some dummy data.
Then select Advanced, and as per your CSV data size is required to set column width.
Then click the Next button.
Destination select as SQL Server Native Client and Enter the Server name;
Enter SQL Server Authentication data and click the Next button.
Then click the Next button.
Then click the Next button.
Then click the Finish button.
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.
Enjoy!