IMG-LOGO

SQL LCASE()

andy - 26 Sep, 2013 4148 Views 0 Comment

The SQL LCASE() function is used to convert a text or string value to lower case values.

Example Customer Table

The following data table is for example only. Let's use LCASE() function to convert the customer name to all lower case. The column we going to use is the Name column.

ID Name Age
1 Thomas Anderson 45
2 Andrew Golden 38
3 Ken Tom 30
4 Andrew Golden 36
5 Timonthy Kirk 32
6 Kelly Smith 39

Example of Running SQL Query

SELECT ID, LCASE(Name) AS Name, Age
FROM   Customers

After running the above query, it will return the following result.

ID Name Age
1 thomas anderson 45
2 andrew golden 38
3 ken tom 30
4 andrew golden 36
5 timonthy kirk 32
6 kelly smith 39

Comments

There are no comments available.

Write Comment
0 characters entered. Maximum characters allowed are 1000 characters.

Related Blogs

How to restore database using SQL query in TSQL?

If you have a database backup bak file extension and want to restore it using SQL query You can use the built in RESTORE DATABASE function Remember in order to be able to restore a database successfully You need to ...

Related Tutorials

SQL AVG()

Learn what is AVG() function in SQL server and how to use AVG() in sql query.

SQL UCASE()

Learn what is UpperCase function in SQL server and how to use UCASE() in sql query.

SQL COUNT()

Learn what is COUNT() function in SQL server and how to use COUNT() in sql query.

SQL NOW()

SQL NOW() function is used to return current database server date and time.