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().




//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 *

By continuing to use the site, you agree to the use of cookies. more information

The cookie settings on this website are set to "allow cookies" to give you the best browsing experience possible. If you continue to use this website without changing your cookie settings or you click "Accept" below then you are consenting to this.