时间:2021-07-01 10:21:17 帮助过:22人阅读
代码如下:
ALTER DATABASE db_name DEFAULT CHARACTER SET character_name [COLLATE ...];
代码如下:
ALTER TABLE tbl_name CONVERT TO CHARACTER SET character_name [COLLATE ...]
只是修改表的默认字符集:
代码如下:
ALTER TABLE tbl_name DEFAULT CHARACTER SET character_name [COLLATE...];
修改字段的字符集:
代码如下:
ALTER TABLE tbl_name CHANGE c_name c_name CHARACTER SET character_name [COLLATE ...];
查看数据库编码:
代码如下:
SHOW CREATE DATABASE db_name;
代码如下:
SHOW CREATE TABLE tbl_name;
代码如下:
SHOW FULL COLUMNS FROM tbl_name;