In SQLite we can use the upper()
function to convert lowercase characters to uppercase.
Example
SELECT upper('Attention please!');
Result:
ATTENTION PLEASE!
We can see that all lowercase characters were converted to their uppercase equivalent. Any uppercase characters remain uppercase.
A Database Example
Here’s an example that uses data from a database:
SELECT
PetName,
upper(PetName)
FROM Pets;
Result:
+---------+----------------+ | PetName | upper(PetName) | +---------+----------------+ | Homer | HOMER | | Yelp | YELP | | Fluff | FLUFF | | Brush | BRUSH | +---------+----------------+
In this case, I converted all data in the PetName
column to its uppercase equivalent.
We can alternatively use the lower()
function if we need to convert the other way around (i.e. from uppercase to lowercase).