UPPER Function in MS SQL Server and Its Equivalent in MySQL


UPPER, used to convert strings to uppercase, is the same in both MSSQL and MySQL.

MSSQL

UPPER converts a string to uppercase. It's similar to LOWER, which converts a string to lowercase.

Syntax:

UPPER(string)

Examples:

select UPPER('This is demo');
------------------------
THIS IS DEMO

select UPPER(name) from emp;
-------------------------
SMITH
JOHN
SCOTT
THOMAS

UPPER function Example in MSSQL

MySQL

In MySQL, the same functionality is available with UPPER or UCASE — UCASE is a synonym for UPPER.

Syntax:

UPPER(string)
UCASE(string)

Example:

mysql> select UPPER('This is Demo');
+-----------------------+
| UPPER('This is Demo') |
+-----------------------+
| THIS IS DEMO          |
+-----------------------+

mysql> select UCASE('This is Demo');
+-----------------------+
| UCASE('This is Demo') |
+-----------------------+
| THIS IS DEMO          |
+-----------------------+

UPPER function in MySQL

Back to Converting Functions from MSSQL to MySQL