Home

Thursday, January 13, 2011

Mysql - Modify character set

Command to change character set of database to utf8
ALTER DATABASE DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
Command to change character set of table to utf8
ALTER TABLE CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;

View TABLE COLLATION of a table

select table_collation from information_schema.tables WHERE table_schema = 'nxtm_staging_qc' and table_name LIKE 'nxtm_artist_profile';

No comments:

Post a Comment