What is UPPER() in SQL?

The UPPER() function converts a string sent as a parameter to uppercase.

Figure 1 shows a visual representation of the UPPER() function.

Figure 1: Visual representation of UPPER() function

Syntax

UPPER(string)

Parameter

The UPPER() function takes in a string that needs to be converted to uppercase as a required parameter.

Return value

The UPPER() function returns the uppercase version of a string sent as a parameter.

If a number is sent as a parameter, then UPPER() returns the number unchanged.

Code

-- string
SELECT UPPER('hello');
-- number
SELECT UPPER(123);

Free Resources