Is there a MySQL command to convert a string to lowercase?


Question

I have a MySQL database of keywords that are presently mixed-case. However, I want to convert them all to lowercase. Is there an easy command to do this, either using MySQL or MySQL and PHP?

1
119
10/21/2008 1:01:20 PM

Accepted Answer

UPDATE table SET colname=LOWER(colname);
243
10/21/2008 1:03:16 PM

Yes, the function is LOWER() or LCASE() (they both do the same thing).

For example:

select LOWER(keyword) from my_table

Licensed under: CC-BY-SA with attribution
Not affiliated with: Stack Overflow
Icon