课程: Hands-On Introduction: SQL
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Add new rows to a table
- [Instructor] Now that we know how to create tables, let's learn how to add new rows into the table. We use the INSERT statement to do that. There are three approaches to insert rows into a table. The first one is to insert one row at a time using the INSERT statement. The second approach is by using a script. So we can insert multiple rows at a time by using ampersand substitution in the INSERT statement to prompt for runtime values. We'll understand this a little better in the next slides. The third approach is to copy rows from an existing table to a new table. This way, we can copy multiple rows at a time by using a subquery. Now let's take a look at each approach. The syntax to insert one row at a time is INSERT INTO table_name, followed by the columns names, VALUES keyword, followed by the values corresponding to the columns that we list down here. So now let's take a look at a few examples for this. Let's…