What if you could find any name perfectly, no matter how it's typed?
Why UPPER and LOWER in MySQL? - Purpose & Use Cases
Imagine you have a list of names written in different styles: some are all uppercase, some all lowercase, and others a mix. You want to find all people named "john" regardless of how their name is typed.
Manually checking each name for every possible case variation is slow and tiring. You might miss some matches or make mistakes because you have to remember all the ways "john" can appear.
The UPPER and LOWER functions let you change all text to the same case automatically. This way, you can compare names easily without worrying about how they were typed.
WHERE name = 'john' OR name = 'John' OR name = 'JOHN'
WHERE LOWER(name) = 'john'It makes searching and comparing text simple and reliable, no matter how the data was entered.
A company wants to send a welcome email to all users named "alice". Using LOWER, they find every "Alice", "ALICE", or "alice" in their database easily.
Manual text matching is slow and error-prone.
UPPER and LOWER standardize text case for easy comparison.
This helps find and organize data regardless of typing differences.