0
0
MySQLquery~10 mins

UPPER and LOWER 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 convert the 'name' column to uppercase.

MySQL
SELECT [1](name) FROM employees;
Drag options to blanks, or click blank then click option'
ALOWER
BUPPER
CLENGTH
DTRIM
Attempts:
3 left
💡 Hint
Common Mistakes
Using LOWER instead of UPPER will convert to lowercase.
Using LENGTH returns the string length, not case conversion.
2fill in blank
medium

Complete the code to convert the 'city' column to lowercase.

MySQL
SELECT [1](city) FROM customers;
Drag options to blanks, or click blank then click option'
ALOWER
BSUBSTRING
CCONCAT
DUPPER
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER will convert to uppercase, not lowercase.
CONCAT joins strings but does not change case.
3fill in blank
hard

Fix the error in the code to convert 'product_name' to uppercase.

MySQL
SELECT [1](product_name) FROM products;
Drag options to blanks, or click blank then click option'
ALOWER
BUPPER)
CUPPER
DLOWER)
Attempts:
3 left
💡 Hint
Common Mistakes
Missing closing parenthesis causes syntax error.
Using LOWER instead of UPPER changes case incorrectly.
4fill in blank
hard

Fill both blanks to convert 'last_name' to lowercase and alias it as 'lname'.

MySQL
SELECT [1](last_name) AS [2] FROM staff;
Drag options to blanks, or click blank then click option'
ALOWER
BUPPER
Clname
Dlastname
Attempts:
3 left
💡 Hint
Common Mistakes
Using UPPER instead of LOWER changes case wrongly.
Using 'lastname' as alias instead of 'lname' does not match the instruction.
5fill in blank
hard

Fill all three blanks to select 'department' in uppercase, 'manager' in lowercase, and alias 'manager' as 'mgr'.

MySQL
SELECT [1](department), [2](manager) AS [3] FROM company;
Drag options to blanks, or click blank then click option'
AUPPER
BLOWER
Cmgr
Dstaff
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up UPPER and LOWER functions.
Using wrong alias names.