Open In App

PostgreSQL – UPPER function

Improve
Improve
Like Article
Like
Save
Share
Report

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:


Last Updated : 28 Aug, 2020
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads