Skip to content

Instantly share code, notes, and snippets.

@ErDmKo
Last active August 29, 2015 13:58
Show Gist options
  • Save ErDmKo/10373394 to your computer and use it in GitHub Desktop.
Save ErDmKo/10373394 to your computer and use it in GitHub Desktop.
#it is not working
@sql_f = SELECT group_concat(CONCAT("ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CHARACTER SET utf8 COLLATE utf8_general_ci; ",
"ALTER TABLE ",TABLE_SCHEMA,".",TABLE_NAME," CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; ") SEPARATOR '; ')
AS alter_sql
FROM information_schema.TABLES
WHERE TABLE_SCHEMA = 'tc-akvarel_ru';
PREPARE sql FROM @sql_f;
EXECUTE sql;
DEALLOCATE PREPARE sql;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment