0
0
SQLquery~10 mins

INSERT INTO multiple rows in SQL - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to insert multiple rows into the table.

SQL
INSERT INTO employees (name, age) VALUES [1];
Drag options to blanks, or click blank then click option'
A('Alice', 30); ('Bob', 25)
B('Alice', 30)
C('Alice', 30), ('Bob', 25)
D('Alice', 30) ('Bob', 25)
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons between rows instead of commas.
Not using parentheses around each row.
Trying to insert rows without separating them.
2fill in blank
medium

Complete the code to insert three rows into the products table.

SQL
INSERT INTO products (product_name, price) VALUES [1];
Drag options to blanks, or click blank then click option'
A('Pen', 1.5), ('Notebook', 3.0), ('Eraser', 0.5)
B('Pen', 1.5); ('Notebook', 3.0); ('Eraser', 0.5)
C('Pen', 1.5) ('Notebook', 3.0) ('Eraser', 0.5)
D('Pen', 1.5)
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons instead of commas between rows.
Missing commas between rows.
Not enclosing each row in parentheses.
3fill in blank
hard

Fix the error in the code to insert multiple rows correctly.

SQL
INSERT INTO orders (order_id, quantity) VALUES [1];
Drag options to blanks, or click blank then click option'
A(101, 2); (102, 5)
B(101, 2), (102, 5)
C(101, 2) (102, 5)
D101, 2, 102, 5
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons instead of commas.
Not enclosing rows in parentheses.
Listing values without grouping them as rows.
4fill in blank
hard

Fill both blanks to insert two rows with columns id and score.

SQL
INSERT INTO results (id, score) VALUES [1] [2];
Drag options to blanks, or click blank then click option'
A(1, 90),
B(1, 90);
C(2, 85)
D(2, 85);
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons between rows.
Missing commas between rows.
Not enclosing rows in parentheses.
5fill in blank
hard

Fill all three blanks to insert three rows into the table users with columns username and email.

SQL
INSERT INTO users (username, email) VALUES [1] [2] [3];
Drag options to blanks, or click blank then click option'
A('john', 'john@example.com'),
B('jane', 'jane@example.com'),
C('doe', 'doe@example.com')
D('jack', 'jack@example.com')
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a comma after the last row.
Using semicolons between rows.
Not enclosing rows in parentheses.