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.
Search Keys
- sql lcase function
- sql lcase
- lcase
- sql lower
- sql lowercase
- sql server lowercase
- sql lower case
- 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:
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 |
5 |
Pandurengan |
Computer Science |
HTML |
2014 |
6410.7 |
6 |
Padmavathi |
Administrator |
Oracle |
2014 |
3260 |
7 |
Sakunthala |
SQL Mining |
C#.Net |
2013 |
22790.8 |
8 |
Keshavan |
Relational DBMS |
C#.Net |
2012 |
15020 |
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 |
5 |
html |
6 |
oracle |
7 |
c#.net |
8 |
c#.net |