Update all values of a column to lowercase

Version for case-insensitive matching and including a "WHERE" clause if you don't want to update the entire column:

UPDATE table 
SET tag = LOWER(tag)
WHERE LOWER(tag) != tag
COLLATE Latin1_General_CS_AS

The COLLATE line will make it work if your database uses case insensitive matching, as mine does.


See http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_lower

UPDATE table_name SET tag = LOWER(tag)

LOWER()

update table set tag = LOWER(tag)

Try this:

update `table` set `column_name` = LOWER(column_name without quotation)

Tags:

Mysql