Section 1

Preview this deck

celebs is the name of the table the row is added to

Front

Star 0%
Star 0%
Star 0%
Star 0%
Star 0%

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Active users

0

All-time users

0

Favorites

0

Last updated

6 years ago

Date created

Mar 1, 2020

Cards (5)

Section 1

(5 cards)

celebs is the name of the table the row is added to

Front

(id, name, age) is a parameter identifying the columns that data will be inserted into.

Back

SELECT is a clause that indicates that the statement is a query. You will use SELECT every time you query data from a database.

Front

Yes, instead of inserting each row in a separate INSERT statement, you can actually insert multiple rows in a single statement. To do this, you can list the values for each row separated by commas, following the VALUES clause of the statement. Here is how it would look, INSERT INTO table (col1, col2, col3) VALUES (row1_val1, row1_val2, row1_val3), (row2_val1, row2_val2, row2_val3), (row3_val1, row3_val2, row3_val3);

Back

INSERT INTO

Front

is a clause that adds the specified row or rows.

Back

VALUES is a clause that indicates the data being inserted.

Front

(1, 'Justin Bieber', 22) is a parameter identifying the values being inserted.

Back

INSERT INTO celebs (id, name, age) VALUES (1, 'Justin Bieber', 22); INSERT INTO celebs (id, name, age) VALUES (2, 'Beyonce Knowles', 33); INSERT INTO celebs (id, name, age) VALUES (3, 'Jeremy Lin', 26); INSERT INTO celebs (id, name, age) VALUES (4, 'Taylor Swift', 26);

Front

4 rows

Back