0
0
MySQLquery~10 mins

Why SELECT retrieves data in MySQL - Test Your Understanding

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

Complete 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'
A*
BALL
CCOLUMNS
DEVERYTHING
Attempts:
3 left
💡 Hint
Common Mistakes
Using words like ALL or COLUMNS instead of *
Forgetting to specify what to select
2fill in blank
medium

Complete 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'
Aall
Bname
Cnames
Demployee_name
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
3fill in blank
hard

Fix the error in the code to select the 'age' column from 'employees'.

MySQL
SELECT [1] FROM employees;
Drag options to blanks, or click blank then click option'
A*
Bage;
Cage
Dages
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a semicolon after the column name inside the SELECT clause
Using wrong column names like 'ages'
4fill in blank
hard

Fill both blanks to select the 'salary' column from 'employees' where salary is greater than 50000.

MySQL
SELECT [1] FROM employees WHERE salary [2] 50000;
Drag options to blanks, or click blank then click option'
Asalary
B>
C<
D*
Attempts:
3 left
💡 Hint
Common Mistakes
Using '*' instead of 'salary' in SELECT
Using '<' instead of '>' in the WHERE clause
5fill in blank
hard

Fill all three blanks to select 'name' and 'age' from 'employees' where age is less than 30.

MySQL
SELECT [1], [2] FROM employees WHERE age [3] 30;
Drag options to blanks, or click blank then click option'
Aname
Bage
C<
D>
Attempts:
3 left
💡 Hint
Common Mistakes
Using '>' instead of '<' in the WHERE clause
Swapping the order of columns (though this is not an error, but less common)