UCASE() or UPPER() Function in MySQL

1. UCASE() : 
This function could be used to convert a string to upper-case. This function is similar to the UPPER() function. UPPER()\UCASE() are built-in MySQL function. 

Syntax : 
 

SELECT UCASE(text)

Example – 
 

SELECT UCASE("MySQL on w3wiki is FUN!") AS UpperText;

Output : 

 

UpperText
MYSQL ON w3wiki IS FUN!

Now, here you will see UPPER function. 

2. UPPER() : 

Syntax : 
 

SELECT UPPER(text)

Example – 
 

SELECT UPPER("MySQL on w3wiki is FUN!") AS UpperText;

Output : 

 

UpperText
MYSQL ON w3wiki IS FUN!

Dealing with binary string data : 
The UPPER() function does not affect the binary strings such as BINARY, VARBINARY, or BLOB. Hence, to use binary string in the UPPER() function, it needed to convert to the string to non-binary string. 

Example – 
 

SET @str = BINARY 'w3wiki';

Now, If you want to read binary string used the following syntax given below. 
 

SELECT UPPER(@str), UPPER(CONVERT(@str USING utf8mb4)) AS UpperText;

Output : 

 

UPPER(@str)  UpperText
w3wiki w3wiki

Note – 
It is clearly observed from the output, the UPPER() function has no effect on the binary string.