mysql count occurrences of special character in a field

select length('aa:bb:cc:dd')-length(replace('aa:bb:cc:dd',':',''));

source: http://lists.mysql.com/mysql/215049

Leave a Comment