Skip to content

Instantly share code, notes, and snippets.

@6farer
Created August 3, 2018 19:18
Show Gist options
  • Save 6farer/b157b3b193187e2874a35de05a3ef513 to your computer and use it in GitHub Desktop.
Save 6farer/b157b3b193187e2874a35de05a3ef513 to your computer and use it in GitHub Desktop.
SELECT
CONCAT('ALTER TABLE ',
tbl.TABLE_SCHEMA,
'.',
tbl.TABLE_NAME,
' CONVERT TO CHARACTER SET utf8 COLLATE utf8_unicode_ci;')
FROM
information_schema.TABLES tbl
WHERE
tbl.TABLE_SCHEMA = 'DBNAMEGOESHERE*****'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment