MySQL LOWER is one of the String Function, which is used to convert the specified character expression to lowercase. In this article we will show you, How to use this string LOWER in MySQL with example.
MySQL LOWER Syntax
The basic syntax of the LOWER Function in MySQL is as shown below:
SELECT LOWER (Expression) FROM [Source]
In order to demonstrate this string Lower function in MySQL, We are going to use the customer details table data that we shown below
MySQL LOWER Example 1
The LOWER Function in MySQL is used to convert the user given expression into lowercase. The following query will show multiple ways to use this lower function.
SELECT LOWER('TUTORIAL GATEWAY'); SELECT LOWER('HeLLo GATEwAY'); -- Let me try NULL value SELECT LOWER(NULL);
MySQL LOWER Example 2
In this example, we are going to implement the string LOWER function on different set of columns in a table. Below statement will convert the string data in First_Name, Last_Name, and Education column to Lowercase.
-- MySQL String LOWER Example USE company; SELECT First_Name, LOWER(First_Name) AS Lower_FName, Last_Name, LOWER(Last_Name) AS Lower_LName, Education, LOWER(Education) AS Lower_Edu, Profession, Yearly_Income, Sales FROM dupcustomerdetails;