From the course: Microsoft SQL Server 2019 Essential Training

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Solution: Add data with T-SQL commands

Solution: Add data with T-SQL commands - SQL Server Tutorial

From the course: Microsoft SQL Server 2019 Essential Training

Solution: Add data with T-SQL commands

- [Instructor] For this challenge, we were given a table of menu items for a hamburger restaurant, and were asked by the head chef to add in a couple of new items so that our guests have some additional selections to choose from. I'm going to start by just running the Select statement that we're given to see everything that's in the restaurant menu to start with. So this table has four columns. The item ID we're told is an auto incrementing ID number, so we're not going to fill this in. The database will add these ID numbers for us as we add in our additional items. And then we have an item name, category, and price column. And there's currently two different selections on the menu right now. So we're just going to add in three additional items to this menu, and we can do that with an insert statement. So we'll say insert into the restaurant menu table. And because we're not going to fill in values for all four columns, I do need to specify the columns that I am inserting values into.…

Contents