Convert Uppercase Characters to Lowercase to Compare Data in MySQL

MySQL offers LOWER() function which can convert a field’s characters to lowercase. Besides, we can use the LCASE() function, which is a synonym for LOWER().

Syntax:

LOWER(str)
LCASE(str)

Usage:

//convert a field's value to lowercase
SELECT LOWER(post_title) FROM `wp_posts`
SELECT LCASE(post_title) FROM `wp_posts`
//convert any string
SELECT LOWER('Uppercase')
SELECT LCASE('Uppercase')

Leave a Comment

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