UPPER function in SQL

The UPPER function in SQL is used to convert a string to uppercase letters. It is a string function that can be applied to columns or string literals.

SQL Syntax

UPPER(string)

Example: Suppose we have a table employees with a column first_name containing names in various cases, and we want to display all names in uppercase.

employee_idfirst_name
1John
2Jane
3MiChael
4Sarah

SQL

SELECT employee_id, UPPER(first_name) AS first_name_upper
FROM employees;

The output of the above query is shown below:

employee_idfirst_name_upper
1JOHN
2JANE
3MICHAEL
4SARAH