Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete 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'
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.
✗ Incorrect
The 'name' column is specified to insert the value 'Alice' correctly.
2fill in blank
mediumComplete 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Using a column name that does not match the value type.
Forgetting to separate columns with commas.
✗ Incorrect
The second column is 'age' to match the value 30.
3fill in blank
hardFix 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Omitting parentheses around column names.
Missing commas between column names.
✗ Incorrect
The column list must be enclosed in parentheses and separated by commas.
4fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up column order and values.
Using columns that don't match the values.
✗ Incorrect
The columns 'name' and 'department' match the values 'Dave' and 'HR'.
5fill in blank
hardFill 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'
Attempts:
3 left
💡 Hint
Common Mistakes
Incorrect column order causing value mismatch.
Using columns that don't match the values.
✗ Incorrect
The columns 'id', 'name', and 'salary' correspond to the values 101, 'Eve', and 70000 respectively.