mysql update script problem. all txt is lower case just first letter is upper case
This are my text in mysql datab开发者_如何学Case.
Otok Pasman, Kraj
Otok pasman,Kraj
Otok Pasman , Kraj
Otok pasman, Kraj
Otok PASMAN, Kraj
How can i automatically change all rows to lower case, first letter must be upper case and " , " is always ", "?
so like this:
Otok Pasman, Kraj
and all other text in database like this example?
something like this should work:
UPDATE `table`
SET `field` = REPLACE(CONCAT(UPPER(LEFT(`field`, 1)), LOWER(SUBSTRING(`field`, 2))),' , ', ', ')
精彩评论