SQL LCASE() FUNCTION

SQL LCASE() FUNCTION

SQL LCASE() FUNCTION

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

SYNTAX

SELECT LCASE ( column_name) FROM table_name.

EXAMPLE

We have the following “Persons” table:

p-Id        LastName             FirstName         Address            City

1            Jameson               John                 Streets 15         Sander

2            Smith     Kate         Green 68     Sander

3           Kristensen     Olya                     Sri 2              Stavn

Now we want to select the content of the “LastName” and  “FirstName” columns 

above and convert the “LastName” column to lowercase.

EXAMPLE

SELECT LCASE(LastName) as LastName,FirstName FROM Persons

RESULT

LastName       FirstName


jameson             John

smith.                  Kate

kristensen.          Olya

Leave a Reply

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