Last active
June 18, 2019 15:08
-
-
Save erkineren/a6f5fd460ada007be6c7736992844fda to your computer and use it in GitHub Desktop.
Change db tables and columns charset quickly - Veritabanı tablo ve kolonlar karakter setini hızlı değiştir
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 utf8 COLLATE utf8_general_ci;') | |
FROM information_schema.TABLES | |
WHERE TABLE_SCHEMA = 'db_name'; | |
# Example Output - Örnek Çıktı: | |
# ALTER TABLE db_name.table_name CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment