Created
November 3, 2017 01:29
A sql query that will create sql commands to convert all tables and columns from database to utf8mb4 so you can have emojis in text you sicko
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT CONCAT( | |
'ALTER TABLE ',TABLE_SCHEMA,'.',TABLE_NAME, | |
' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' | |
) | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'databasename'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment