#查询数据库各表的排序规则 SELECT TABLE_NAME,TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'database'; #查询要修改排序规则表的SQL语句 SELECT concat('ALTER TABLE ',TABLE_NAME,' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;') FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA = 'database'; #复制好SQL语句执行即可 ALTER TABLE biz_mark CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE biz_printtemplate CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE biz_rights CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; ALTER TABLE biz_usermapping CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
标签:编码,CONVERT,utf8mb4,CHARACTER,ci,unicode,mysql,TABLE,排序 From: https://www.cnblogs.com/dreamman/p/17555822.html