课程: Learning Microsoft SQL Server 2022

今天就学习课程吧!

今天就开通帐号,24,700 门业界名师课程任您挑!

Add data with an INSERT statement

Add data with an INSERT statement

- [Instructor] We've already seen how to enter data using Management Studio's edit top 200 rows option that can be found in a table's right click contextual menu. This is a convenient option but most data entry tasks in SQL Server will be accomplished through transact SQL commands. These commands will use the query keyword insert. To use it, we specify the columns hat we want to insert data into and then supply a list of the values. So let's leave the Wide World Importers database for a moment and go back into the Red 30 Tech custom database. I'm going to take a look at the products table like I'll just open it up and expand the columns. So you'll remember that these are all the columns that we added when we created the products table. I can run a select query to select all of that data. I'll just select star or select everything from dbo.products. Now I do need to make sure I'm targeting the correct database. If…

内容