Recall & Review
beginner
What does the SQL command
INSERT INTO do?It adds new rows (records) into a table in the database.
Click to reveal answer
beginner
How do you insert multiple rows in one SQL statement?
Use
INSERT INTO table_name (columns) VALUES (row1), (row2), (row3); listing each row's values separated by commas.Click to reveal answer
intermediate
Why is inserting multiple rows at once better than inserting one row at a time?
It is faster and uses fewer resources because the database processes one command instead of many.
Click to reveal answer
beginner
Write an example SQL query to insert two rows into a table named
students with columns id and name.INSERT INTO students (id, name) VALUES (1, 'Alice'), (2, 'Bob');
Click to reveal answer
intermediate
What happens if you try to insert rows with duplicate primary keys using
INSERT INTO multiple rows?The database will return an error and will not insert any of the rows unless you handle duplicates with special clauses.
Click to reveal answer
Which SQL syntax correctly inserts multiple rows into a table named
products?✗ Incorrect
Option A uses the correct syntax to insert multiple rows in one statement.
What separates each row's values in a multi-row INSERT statement?
✗ Incorrect
Each row's values are separated by commas in the VALUES clause.
If you want to insert three rows into a table, how many times do you write the column names in the INSERT statement?
✗ Incorrect
You write the column names only once before the VALUES list.
What will happen if one row in a multi-row INSERT violates a constraint (like a duplicate primary key)?
✗ Incorrect
The entire statement fails and no rows are inserted unless handled explicitly.
Which of these is a benefit of inserting multiple rows at once?
✗ Incorrect
Inserting multiple rows at once reduces resource usage and improves performance.
Explain how to insert multiple rows into a SQL table in one command.
Think about how you add many items to a list in one go.
You got /3 concepts.
What are the advantages and possible errors when using multi-row INSERT statements?
Consider speed and error handling.
You got /3 concepts.