如下SQL语句所示,分别将库dbsdq、tt2表、tt2表中的c2列修改为utf8mb4字符集。
alter database dbsdq character set utf8mb4 collate utf8mb4_unicode_ci; use dbsdq; alter table tt2 convert to character set utf8mb4 collate utf8mb4_unicode_ci; alter table tt2 modify c2 varchar(10) character set utf8mb4 collate utf8mb4_unicode_ci;