What is UCASE() in SQL?

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

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

Figure 1: Visual representation of UCASE() function

This method has the same functionality as the UPPER() method.

Syntax

UCASE(string)

Parameter

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

Return value

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

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

Example

-- string
SELECT UCASE('hello');
-- number
SELECT UCASE(123);
New on Educative
Learn to Code
Learn any Language as a beginner
Develop a human edge in an AI powered world and learn to code with AI from our beginner friendly catalog
🏆 Leaderboard
Daily Coding Challenge
Solve a new coding challenge every day and climb the leaderboard

Free Resources