SQL LCASE() | LOWER() Function


The SQL LCASE() | LOWER() is a function, and converts the value of a column to lowercase.

The SQL LCASE() | LOWER() function is supports only character based column and it will not work on a numeric field.

It can be used in any valid SQL SELECT statement as well in SQL where clause.

You can also search these topics using sql lcase function, sql server lowercase, tolower sql server.

SQL LCASE() | LOWER() Syntax

For MS Access / ORACLE / MY SQL


//  Convert a input string or text expression to lowercase

SELECT LCASE(string or text);

//  Convert a specific table column value to lowercase

SELECT LCASE(column_name1) FROM table_name;

For SQL SERVER / MySql


//  Convert a input string or text expression to lowercase

SELECT LOWER(string or text);

//  Convert a specific table column value to lowercase

SELECT LOWER(column_name1) FROM table_name;


SQL LCASE() | LOWER() Example - Using Expression Or Formula

The following SQL SELECT statement will convert of a given input string to lowercase:

For MS Access / ORACLE / MY SQL


SELECT LCASE('SimmanChith.COM');

For SQL SERVER / MySql


SELECT LOWER('SimmanChith.COM');

The result of above query is:

Expr
simmanchith.com

SQL LCASE() | LOWER() Function More Example

Input Value Result
LCASE('Sql DataBase Tutorial') sql database tutorial
LCASE('SQL DB 5.0') sql db 5.0

Sample Database Table - Employee

ID EmpName Designation Dept JoinYear Salary
1 Chandra Sql Team Adminstrator SQL Server 2015 14390.4
2 Siva Kumar Cloud Database MS Access 2012 12290.1
3 Bala Murugan Database Security ASP.Net 2013 16280
4 Rishi Keshan Information Tech MySQL 2013 11240

SQL LCASE() | LOWER() Example

The following SQL statement selects the "ID" and "Dept" fields from the "Employee" table, and converts the "Dept" column to lowercase:

For MS Access / ORACLE / MY SQL


SELECT ID, 
LCASE(Dept) As 'Dept Column In Lower Case' 
FROM Employee;

For SQL SERVER / MySql


SELECT ID, 
LOWER(Dept) As 'Dept Column In Lower Case' 
FROM Employee;

The result of above query is:

ID Dept Column In Lower Case
1 sql server
2 ms access
3 asp.net
4 mysql
You can also search these topics using sql change to lowercase, sql case sensitive, sql case insensitive, sql case sensitive compare, sql case insensitive search, sql string functions, case sensitive sql query.