From the course: Database Foundations: Intro to Databases
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Add records
- [Narrator] In order to add records to a data table, you'll use the insert into command. In the two trees database that we created on our SQL Server handsets, we previously created a table, in the product schema called Products, and we can see that table contains a number of different columns. Now, if you wanted to add a data row to this table, you can do that by opening up a new query window, I'll right click on the two trees database, and choose new query. Then we can take out the command, insert into the name of the table that we want to insert a row to, that would be product.products. Then the keyword values. I'll come down to the next line and open up a parentheses. Then we just list out the values for each of these columns, in the order that they appear in the table. The first column is SKU, and we can see that stores character data. In order to store text values or character data, we need to wrap that inside…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.