From the course: Microsoft SQL Server 2019 Essential Training

Unlock the full course today

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

Add data to a table

Add data to a table - SQL Server Tutorial

From the course: Microsoft SQL Server 2019 Essential Training

Start my 1-month free trial

Add data to a table

- [Instructor] To add data to a table, we'll use the INSERT INTO command. I want to use this command to add records about the rooms at the Landon Hotel into the newly created Rooms table. Rather than start with another new, blank query editor, though, I'm going to open up the script that we started building in the last movie. And you can do that by coming up here to the toolbar and either clicking on the Open File button here, or coming to the File menu, coming down to Open, and choosing File from the menu there. Notice that the keyboard shortcut is Control-O The file that I want to find is called Insert_Start Go ahead and double click on that to open it up in a new query window over here. Now this is the CREATE TABLE statement that we created in the last movie. I'm going to come down to line number nine, and we'll start our INSERT statement below. It starts with the keywords INSERT INTO. Then we'll specify the table that we're about to insert records into, the Rooms table. And I'll…

Contents