0
0
MySQLquery~10 mins

Selecting specific columns in MySQL - Interactive Code Practice

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

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'
Aname
B*
Csalary
Demployees
Attempts:
3 left
💡 Hint
Common Mistakes
Using * selects all columns, not just 'name'.
Using the table name instead of the column name.
2fill in blank
medium

Complete the code to select the 'id' and 'email' columns from the 'users' table.

MySQL
SELECT id, [1] FROM users;
Drag options to blanks, or click blank then click option'
Apassword
Bemail
Cname
Daddress
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting unrelated columns like 'password' or 'address'.
Forgetting to separate columns with commas.
3fill in blank
hard

Fix the error in the query that should select only the 'price' column from the 'products' table.

MySQL
[1] FROM products;
Drag options to blanks, or click blank then click option'
ASELECT *, price
BSELECT , price
CSELECT price
DSELECT FROM price
Attempts:
3 left
💡 Hint
Common Mistakes
Adding a comma before the first column name.
Using * alongside a specific column name.
4fill in blank
hard

Fill both blanks to select 'first_name' and 'last_name' columns from the 'customers' table.

MySQL
SELECT [1], [2] FROM customers;
Drag options to blanks, or click blank then click option'
Afirst_name
Bemail
Clast_name
Dphone
Attempts:
3 left
💡 Hint
Common Mistakes
Selecting unrelated columns like 'email' or 'phone'.
Forgetting the comma between columns.
5fill in blank
hard

Fill all three blanks to select 'title', 'author', and 'year' columns from the 'books' table.

MySQL
SELECT [1], [2], [3] FROM books;
Drag options to blanks, or click blank then click option'
Apublisher
Bauthor
Cyear
Dtitle
Attempts:
3 left
💡 Hint
Common Mistakes
Including unrelated columns like 'publisher'.
Mixing up the order of columns.