MySQL LOWER is one of the String Functions, which is useful to convert the specified character expression to lowercase. The syntax of the LOWER Function in MySQL is as shown below:
SELECT LOWER (Expression) FROM [Source]
To demonstrate this string Lowercase function in MySQL, We are going to use the customer details table data that we showed below
MySQL LOWER Example 1
The String Lower converts the user given expression into lowercase. The following select query shows multiple ways to use this lower function.
SELECT LOWER('TUTORIAL GATEWAY'); SELECT LOWER('HeLLo GATEwAY'); -- Let me try NULL value SELECT LOWER(NULL);
MySQL String Lower Example 2
In this String Function example, we are going to implement the string Lowercase on a different set of columns in a table. The below MySQL statement converts the string data in First_Name, Last_Name, and Education column to Lowercase and returns the output.
-- 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;