mysql数据库编码都有哪些格式
发布网友
发布时间:2022-04-19 14:05
我来回答
共2个回答
懂视网
时间:2022-04-29 21:44
*/ |
+----------+------------------------------------------------------------------+
1 row in set (0.00 sec)
2) 查看表和字段的编码格式
mysql> show create table t_user;
+--------+----------------------------------------------------
--------------------------------------------------------------
-----------------------------------------------------------+
| Table | Create Table
|
+--------+----------------------------------------------------
--------------------------------------------------------------
-----------------------------------------------------------+
| t_user | CREATE TABLE `t_user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(40) CHARACTER SET utf8 DEFAULT NULL,
`birth` datetime DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=gbk |
+--------+----------------------------------------------------
--------------------------------------------------------------
-----------------------------------------------------------+
1 row in set (0.00 sec)
MySQL编码格式
标签:mysql 编码格式
热心网友
时间:2022-04-29 18:52
修改数据库成utf8的.mysql>
alter
database
name
character
set
utf8;
修改表默认用utf8.mysql>
alter
table
type
character
set
utf8;
修改字段用utf8mysql>
alter
table
type
modify
type_name
varchar(50)
character
set
utf8;