Last Updated: February 25, 2016
·
2.564K
· daniel-melzer

Find control characters in MySQL

If you want to find any control character in one of your MySQL tables, use the following query:

SELECT
    *
FROM
    `some_table`
WHERE
    `some_field` REGEXP ".*[[:cntrl:]]+.*"

You can find more to regular expressions in MySQL in the online documentation:

http://dev.mysql.com/doc/refman/5.5/en/regexp.html#operator_regexp