Home >Database >Mysql Tutorial >mysql 修改表的默认字符集和修改表字段的默认字符集_MySQL

mysql 修改表的默认字符集和修改表字段的默认字符集_MySQL

WBOY
WBOYOriginal
2016-06-01 13:10:121312browse

修改表的默认字符集:

ALTER TABLE table_name DEFAULT CHARACTER SET character_name;

修改表字段的默认字符集:

ALTER TABLE table_name CHANGE field field field_type CHARACTER SET character_name [other_attribute]

修改表的默认字符集和所有列的字符集:

ALTER TABLE table_name CONVERT TO CHARACTER SET character_name

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn