Skip to content

Instantly share code, notes, and snippets.

@Electrica
Created September 5, 2017 12:57
Show Gist options
  • Save Electrica/0678b1299d82910179a487df01a283cd to your computer and use it in GitHub Desktop.
Save Electrica/0678b1299d82910179a487df01a283cd to your computer and use it in GitHub Desktop.
Конвертация базы данных
SELECT CONCAT( 'ALTER TABLE `', t.`TABLE_SCHEMA` , '`.`', t.`TABLE_NAME` , '` CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;' ) AS sqlcode
FROM `information_schema`.`TABLES` t
WHERE 1
AND t.`TABLE_SCHEMA` = 'My_DB_for_convert'
ORDER BY 1
LIMIT 0 , 90
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment