Created
November 3, 2017 01:29
-
-
Save Somrlik/8509b799db20a94c4e14ccfd35dce6ca to your computer and use it in GitHub Desktop.
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 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