The Wayback Machine - https://web.archive.org/web/20230527180812/https://www.geeksforgeeks.org/postgresql-upper-function/
Skip to content
Related Articles
Get the best out of our app
GeeksforGeeks App
Open App
geeksforgeeks
Browser
Continue

Related Articles

PostgreSQL – UPPER function

Improve Article
Save Article
Like Article
Improve Article
Save Article
Like Article

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:

My Personal Notes arrow_drop_up
Last Updated : 28 Aug, 2020
Like Article
Save Article
Similar Reads