Skip to content

Instantly share code, notes, and snippets.

@stevepereira
Created January 26, 2016 06:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stevepereira/8eb16e339dc27ffcc56a to your computer and use it in GitHub Desktop.
Save stevepereira/8eb16e339dc27ffcc56a to your computer and use it in GitHub Desktop.
Convert tables to unicode
SELECT CONCAT("ALTER TABLE ", TABLE_NAME," DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;") AS ExecuteTheString
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_SCHEMA="99"
AND TABLE_TYPE="BASE TABLE";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment