SQL LOWER, SQL LCASE

The SQL LOWER, or SQL LCASE function is used to convert a string to lower case. In SQL Server, it uses the LOWER function.

SQL LOWER, SQL LCASE Syntax

SELECT LCASE(string_expression) 
FROM table_name

OR in SQL Server:

SELECT LOWER(string_expression) 
FROM table_name

SQL LOWER, SQL LCASE Example

Table: Employees

EmployeeId FirstName LastName
100 Hiyy Ifdae
101 Joies Qfafe
102 Mhoad Mbfdae
103 Hifa Oifdae
104 Yofae Ofdae
105 Hoofda Nfoda
106 Iydfad Uifdad

We want to convert LastName to lower case:

SELECT EmployeeId, FirstName, LOWER(LastName) AS LastName
FROM Employees

The result will look like:

EmployeeId FirstName LastName
100 Hiyy ifdae
101 Joies qfafe
102 Mhoad mbfdae
103 Hifa oifdae
104 Yofae ofdae
105 Hoofda nfoda
106 Iydfad uifdad

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>