From the course: Microsoft SQL Server 2019 Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Import data from CSV files

Import data from CSV files - SQL Server Tutorial

From the course: Microsoft SQL Server 2019 Essential Training

Start my 1-month free trial

Import data from CSV files

- [Instructor] If you have data that's stored in a spreadsheet format, such as Excel or Google Sheets, or another database system, such as Microsoft Access, then you can export that data as a CSV file from their native programs to easily bring it into SQL Server. CSV stands for Comma Separated Values and it's an example of what's called a flat file data table. In the Chapter 03 exercise folder, I have a CSV file that contains additional guests that I'd like to bring into the Landon Hotel database. We can see the data by right-clicking on the file, coming down to Open With, and opening it in Notepad. Comma Separated Values files are formatted exactly as you'd expect, with a comma separating each field in what will become the data table. To add this data to the database we've been working with, I'm going to jump back into Management Studio. Then, I'll right-click on the Landon Hotel database in the Object Explorer window, come down to Tasks, and then, come all the way down to Import…

Contents