Recall & Review
beginner
What does the UPPER function do in SQL?
The UPPER function converts all letters in a text string to uppercase letters.
Click to reveal answer
beginner
What is the purpose of the LOWER function in SQL?
The LOWER function converts all letters in a text string to lowercase letters.
Click to reveal answer
beginner
Write a SQL query to convert the column 'name' to uppercase.
SELECT UPPER(name) FROM table_name;
Click to reveal answer
intermediate
How can you make a case-insensitive search using UPPER or LOWER?
Convert both the column and the search term to the same case using UPPER or LOWER, then compare them.
Click to reveal answer
beginner
If you apply LOWER to 'Hello World!', what is the result?
The result is 'hello world!'. Only letters change case; punctuation and spaces stay the same.
Click to reveal answer
What will SELECT UPPER('sql') return?
✗ Incorrect
UPPER converts all letters to uppercase, so 'sql' becomes 'SQL'.
Which function converts text to lowercase in SQL?
✗ Incorrect
LOWER() is the standard SQL function to convert text to lowercase.
How can you compare two strings ignoring case differences?
✗ Incorrect
Converting both strings to the same case (UPPER or LOWER) ensures case-insensitive comparison.
What happens to numbers and punctuation when using UPPER or LOWER?
✗ Incorrect
Numbers and punctuation are not affected by UPPER or LOWER functions.
Which SQL function would you use to make 'Hello' into 'hello'?
✗ Incorrect
LOWER('Hello') converts all letters to lowercase, resulting in 'hello'.
Explain how UPPER and LOWER functions work in SQL and give an example of each.
Think about changing letter cases in text columns.
You got /4 concepts.
Describe a real-life situation where using UPPER or LOWER in SQL would be helpful.
Imagine searching names or emails without worrying about letter case.
You got /3 concepts.