0
0
SQLquery~10 mins

INSERT with specific columns 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 new row specifying only the 'name' column.

SQL
INSERT INTO employees ([1]) VALUES ('Alice');
Drag options to blanks, or click blank then click option'
Aname
Bage
Csalary
Ddepartment
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column name that does not match the value type.
Leaving the column list empty when specifying columns.
2fill in blank
medium

Complete the code to insert a new row specifying 'name' and 'age' columns.

SQL
INSERT INTO employees (name, [1]) VALUES ('Bob', 30);
Drag options to blanks, or click blank then click option'
Asalary
Bdepartment
Cid
Dage
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column name that does not match the value type.
Forgetting to separate columns with commas.
3fill in blank
hard

Fix the error in the INSERT statement by completing the column list.

SQL
INSERT INTO employees [1] VALUES ('Carol', 25);
Drag options to blanks, or click blank then click option'
Aname, age
B(name, age)
CVALUES (name, age)
D(name age)
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting parentheses around column names.
Missing commas between column names.
4fill in blank
hard

Fill both blanks to insert a new employee with 'name' and 'department' columns.

SQL
INSERT INTO employees ([1], [2]) VALUES ('Dave', 'HR');
Drag options to blanks, or click blank then click option'
Aname
Bage
Cdepartment
Dsalary
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up column order and values.
Using columns that don't match the values.
5fill in blank
hard

Fill all three blanks to insert a new employee with 'id', 'name', and 'salary' columns.

SQL
INSERT INTO employees ([1], [2], [3]) VALUES (101, 'Eve', 70000);
Drag options to blanks, or click blank then click option'
Adepartment
Bname
Csalary
Did
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect column order causing value mismatch.
Using columns that don't match the values.