ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
ALTER TABLE tbl_name CONVERT TO CHARACTER SET character_name [COLLATE ...] 如:ALTER TABLE logtest CONVERT TO CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE tbl_name DEFAULT CHARACTER SET character_name [COLLATE...]; 如:ALTER TABLE logtest DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci;
ALTER TABLE tbl_name CHANGE c_name c_name CHARACTER SET character_name [COLLATE ...]; 如:ALTER TABLE logtest CHANGE title title VARCHAR(100) CHARACTER SET utf8 COLLATE utf8_general_ci;
SHOW CREATE DATABASE db_name;
SHOW CREATE TABLE tbl_name;
查看字段编码:
SHOW FULL COLUMNS FROM tbl_name;
原文:http://www.diannaowa.com/index.php/archives/233