Created
August 20, 2014 06:24
-
-
Save prggmr/f6ccc28f59595aff3f84 to your computer and use it in GitHub Desktop.
Update ALL MySQL Columns
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 , ' MODIFY ', COLUMN_NAME, ' ', DATA_TYPE , '(', CHARACTER_MAXIMUM_LENGTH , ') CHARACTER SET utf8 ;' ) FROM COLUMNS WHERE TABLE_SCHEMA = 'vpd1' AND CHARACTER_SET_NAME != 'utf8'; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment