Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to select all columns from the table named 'employees'.
MySQL
SELECT [1] FROM employees; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like ALL or columns instead of *
Forgetting to specify what to select
✗ Incorrect
The asterisk (*) means select all columns from the table.
2fill in blank
mediumComplete the code to select only the 'name' column from the 'employees' table.
MySQL
SELECT [1] FROM employees; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural or different column names like 'names' or 'employee_name'
Using keywords like 'all' instead of a column name
✗ Incorrect
Use the exact column name 'name' to select that column.
3fill in blank
hardFix the error in the query to select the 'salary' column from 'employees'.
MySQL
SELECT [1] FROM employees; Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using plural or abbreviated column names
Using incorrect capitalization if case-sensitive
✗ Incorrect
The correct column name is 'salary'. Using the exact column name avoids errors.
4fill in blank
hardFill both blanks to select the 'name' and 'salary' columns from 'employees'.
MySQL
SELECT [1], [2] FROM employees;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using columns not in the table
Forgetting the comma between column names
✗ Incorrect
To select multiple columns, list them separated by commas.
5fill in blank
hardFill all three blanks to select 'name', 'salary', and 'department' columns from 'employees'.
MySQL
SELECT [1], [2], [3] FROM employees;
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Including columns not in the table
Missing commas between column names
✗ Incorrect
List all desired columns separated by commas in the SELECT statement.