Skip to content

Instantly share code, notes, and snippets.

@adam-lynch
Created June 3, 2013 18:40
Show Gist options
  • Save adam-lynch/5700287 to your computer and use it in GitHub Desktop.
Save adam-lynch/5700287 to your computer and use it in GitHub Desktop.
This returns all tuples which contain multi-byte characters. This came in handy when I was dealing with a MySQL database that was polluted with gibberish due to character encoding problems.
SELECT *
FROM table_name
WHERE LENGTH(column_name) != CHAR_LENGTH(column_name);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment