PostgreSQL – UPPER function
Last Updated :
28 Aug, 2020
In PostgreSQL, the UPPER function is used to convert a string into upper case.
Syntax: UPPER(string_expression)
Like the LOWER function, the UPPER function accepts a string expression or string-convertible expression and converts it to an upper case format. In case the argument is not a string, the user must use the CAST function to explicitly convert it.
Example 1:
The following statement uses the CONCAT function and UPPER function to return the full name of staff in the upper case from the staff table of the
SELECT
CONCAT (
UPPER (first_name),
UPPER (last_name)
) as full_name
FROM
staff;
Output:
Example 2:
The following statement converts a lower case string to an upper case format:
SELECT UPPER('geeksforgeeks');
Output:
Like Article
Suggest improvement
Share your thoughts in the comments
Please Login to comment...