Home > Database > Mysql Tutorial > body text

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

WBOY
Release: 2016-06-01 13:10:12
Original
1266 people have browsed it

修改表的默认字符集:

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

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!