A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.geeksforgeeks.org/postgresql/postgresql-upper-function/ below:

PostgreSQL - UPPER Function - GeeksforGeeks

PostgreSQL - UPPER Function

Last Updated : 15 Jul, 2025

In PostgreSQL, the UPPER function is utilized to convert a string into uppercase. This function is handy when you need to standardize text data by converting it to a uniform case, especially for comparison or display purposes.

Let us get a better understanding of the UPPER Function in PostgreSQL from this article.

Syntax
UPPER(string_expression)
How Does the UPPER Function Work?

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.

PostgreSQL UPPER Function Examples

Let us look at some of the examples of UPPER Function in PostgreSQL to better understand the concept.

Example 1: Combining UPPER with CONCAT

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.

Query:

SELECT
    CONCAT (
        UPPER (first_name),
        UPPER (last_name)
    ) AS full_name
FROM
    staff;

Output:

Explanation:

Example 2: Converting a String to Upper Case

The following statement converts a lower case string to an upper case format.

Query:

SELECT UPPER('geeksforgeeks');

Output:

Explanation: 'UPPER('geeksforgeeks')' converts the string 'geeksforgeeks' to uppercase, resulting in 'GEEKSFORGEEKS'.

Important Points About PostgreSQL UPPER Function


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4