有一个MySQL table具有以下定义SQLYog Enterprise:
table
SQLYog Enterprise
Table Create Table ----------------- --------------------------------------------------------- etape_prospection CREATE TABLE `etape_prospection` ( `etape_prosp_id` int(10) NOT NULL AUTO_INCREMENT, `type_prosp_id` int(10) NOT NULL DEFAULT '0', `prosp_id` int(10) NOT NULL DEFAULT '0', `etape_prosp_date` datetime DEFAULT NULL, `etape_prosp_comment` text, PRIMARY KEY (`etape_prosp_id`), KEY `concerne_fk` (`prosp_id`), KEY `de_type_fk` (`type_prosp_id`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1
我想default charset将此表的更改latin1为utf8。怎么做 ?
default charset
latin1
utf8
如果要将表default character set和所有字符列更改为新字符集,请使用如下语句:
default character set
ALTER TABLE tbl_name CONVERT TO CHARACTER SET charset_name;
因此查询将是:
ALTER TABLE etape_prospection CONVERT TO CHARACTER SET utf8;