mysql 修改字段的字符集


mysql> desc t1;
+----------+----------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+----------+----------------+------+-----+---------+-------+
| id | int(11) | NO | PRI | NULL | |
| userid | int(11) | YES | | NULL | |
| username | varchar(20000) | YES | | NULL | |
+----------+----------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

 

mysql> alter table t1 change username username varchar(200) charset utf8mb4;
Query OK, 0 rows affected (0.11 sec)
Records: 0 Duplicates: 0 Warnings: 0


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM