What if you could find any name no matter how it's typed, with just one simple trick?
Why UPPER and LOWER functions in SQL? - Purpose & Use Cases
Imagine you have a list of customer names written in different ways: some in all caps, some in all lowercase, and some mixed. You need to find all customers named "john" but the spelling varies in case.
Manually checking each name for every possible case variation is slow and tiring. It's easy to miss matches or make mistakes because you have to remember all the ways "john" could be written.
The UPPER and LOWER functions let you change all text to the same case automatically. This way, you can compare names without worrying about how they were typed.
WHERE name = 'john' OR name = 'John' OR name = 'JOHN'
WHERE LOWER(name) = 'john'You can easily find and compare text data regardless of how it was typed, making searches and filters much simpler and more reliable.
A store wants to send a special offer to all customers named "Anna". Using LOWER, they find everyone named "anna", "ANNA", or "Anna" without missing anyone.
Manual text matching is slow and error-prone.
UPPER and LOWER standardize text case for easy comparison.
This makes searching and filtering text data simple and accurate.