LOWER Function in MS SQL Server and Its Equivalent in MySQL


The LOWER function, used to convert strings to lowercase, is the same in both MSSQL and MySQL.

MSSQL

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

Syntax:

LOWER(string)

Examples:

select lower('This is demo');
------------------------
this is demo

select lower(name) from emp;
-------------------------
smith
john
scott
thomas

LOWER function in MSSQL

MySQL

In MySQL, the same functionality is available with LOWER or LCASE — LCASE is a synonym for LOWER.

Syntax:

LOWER(string)
LCASE(string)

Example:

mysql> select lower('This is Demo');
+-----------------------+
| lower('This is Demo') |
+-----------------------+
| this is demo          |
+-----------------------+

mysql> select lcase('This is Demo');
+-----------------------+
| lcase('This is Demo') |
+-----------------------+
| this is demo          |
+-----------------------+

LOWER or LCASE function in MySQL

Back to Converting Functions from MSSQL to MySQL