Skip to content

Instantly share code, notes, and snippets.

@onmotion
Last active May 8, 2019 10:02
Show Gist options
  • Save onmotion/883f8c0e4be177958796e9fbef23ee22 to your computer and use it in GitHub Desktop.
Save onmotion/883f8c0e4be177958796e9fbef23ee22 to your computer and use it in GitHub Desktop.
mysql
ALTER TABLE c6iddis.market_price CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
-----------------------
for all schema
----------------------
USE INFORMATION_SCHEMA;
SELECT
CONCAT("ALTER TABLE `", TABLE_SCHEMA,"`.`", TABLE_NAME, "` CONVERT TO CHARACTER SET UTF8 COLLATE utf8_general_ci;")
AS MySQLCMD FROM TABLES
WHERE TABLE_SCHEMA = "db_name";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment