PostgreSQL upper() Function

The PostgreSQL upper() function converts the string to uppercase and returns it according to the locale rules of the database.

upper() Syntax

This is the syntax of the PostgreSQL upper() function:

upper(str)

Parameters

str

Required. The string to be converted to uppercase.

Return value

The PostgreSQL upper() function returns the uppercase form of the specified string.

If the parameter is NULL, the function will return NULL.

upper() Examples

This example shows how to convert a string to uppercase using the upper() function.

SELECT upper('Hello World') AS "upper('Hello World')";
 upper('Hello World')
----------------------
 HELLO WORLD