WEB DEVELOPER SITE
HTMLCSSJAVASCRIPTSQLPHPBOOTSTRAPJQUERYANGULARXML
 

SQL LCASE() Function


The LCASE() Function

The LCASE() function converts the value of a field to lowercase.

SQL LCASE() Syntax

SELECT LCASE(column_name) FROM table_name;

Syntax for SQL Server

SELECT LOWER(column_name) FROM table_name;

Database

In this tutorial we will use the well-known sample database.

Below is a selection from the "Customers" table:

CustomerID CustomerName Phone Address City Country
1

Ramonita Homan 231-596-2048 ORubaiyat Road Grand Rapid MI USA
2 Charles L. Emmons 507-256-8113 Rosewood Court Clarks Grove MN USA
3 Ruth C. Dorsey Quay Street NAILBRIDGE YO4 5SS UK/td>
4

Evelyn B. Blacker 077 6011 6540 Wade Lane SAND HOLE YO4 5SS UK
5 Nytorpsvägen 45 Christina Berglund Nytorpsvägen 45 BANKERYD Sweden

SQL LCASE() Example

The following SQL statement selects the "CustomerName" and "City" columns from the "Customers" table, and converts the "CustomerName" column to lowercase:

Example

SELECT LCASE(CustomerName) AS Customer, City
FROM Customers;