0
0
SQLquery~10 mins

INSERT INTO single row 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 a single row into the table named employees.

SQL
INSERT INTO employees (name, age) VALUES ([1]);
Drag options to blanks, or click blank then click option'
A'John', 30
B(John, 30)
CJohn, 30
D'John'
Attempts:
3 left
💡 Hint
Common Mistakes
Forgetting to put string values in quotes.
Not separating values with commas.
Including extra parentheses around values.
2fill in blank
medium

Complete the code to insert a single row with columns id and salary into the table payroll.

SQL
INSERT INTO payroll (id, salary) VALUES ([1]);
Drag options to blanks, or click blank then click option'
A'101', 5000
B101, '5000'
C(101, 5000)
D'101', '5000'
Attempts:
3 left
💡 Hint
Common Mistakes
Putting numbers inside quotes.
Mixing data types incorrectly.
3fill in blank
hard

Fix the error in the INSERT statement to add a row into the products table with columns product_name and price.

SQL
INSERT INTO products (product_name, price) VALUES [1];
Drag options to blanks, or click blank then click option'
A('Laptop'; 1200)
B('Laptop', 1200)
CLaptop, 1200
D['Laptop', 1200]
Attempts:
3 left
💡 Hint
Common Mistakes
Using semicolons instead of commas.
Not using parentheses around values.
Using square brackets instead of parentheses.
4fill in blank
hard

Fill both blanks to insert a row into the table orders with columns order_id and customer_name.

SQL
INSERT INTO orders ([1], [2]) VALUES (102, 'Alice');
Drag options to blanks, or click blank then click option'
Aorder_id
Bcustomer_id
Ccustomer_name
Dorder_date
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column names that don't match values.
Mixing up customer_id and customer_name.
5fill in blank
hard

Fill all three blanks to insert a row into the table students with columns student_id, name, and grade.

SQL
INSERT INTO students ([1], [2], [3]) VALUES (201, 'Emma', 'A');
Drag options to blanks, or click blank then click option'
Astudent_id
Bname
Cgrade
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Including columns not in the values list.
Wrong order of columns causing mismatch.