SQL LCASE() Function
- Previous Page SQL ucase()
- Next Page SQL mid()
LCASE() Function
The LCASE function converts the value of the field to lowercase.
SQL LCASE() Syntax
SELECT LCASE(column_name) FROM table_name
SQL LCASE() Example
We have the following 'Persons' table:
Id | LastName | FirstName | Address | City |
---|---|---|---|---|
1 | Adams | John | Oxford Street | London |
2 | Bush | George | Fifth Avenue | New York |
3 | Carter | Thomas | Changan Street | Beijing |
Now, we want to select the contents of the 'LastName' and 'FirstName' columns, and then convert the 'LastName' column to lowercase.
We use the following SQL statement:
SELECT LCASE(LastName) as LastName, FirstName FROM Persons
The result set is similar to this:
LastName | FirstName |
---|---|
adams | John |
bush | George |
carter | Thomas |
- Previous Page SQL ucase()
- Next Page SQL mid()