MySQL Hint: REPLACE / UPDATE

Replace strings with SQL in a field for all rows …

 
UPDATE `table` SET `field` = REPLACE(`field`, 'search string', 'replace with this') WHERE 1=1;

via @vogrim

MySQL/SQL: count chars in table field

SELECT CHAR_LENGTH(field)-CHAR_LENGTH(REPLACE(field,’-',”)) AS count FROM table