mysql修改表字符集与排序规则

---批量修改表字段的字符集

ALTER TABLE table_name CONVERT TO CHARACTER 
SET utf8mb4 COLLATE utf8mb4_general_ci;

---查看字段的字符集

select * from information_schema.columns 
where table_schema = 'db_name' 
and table_name = 'table_name';

---查看表结构

show full columns from table_name;
posted @ 2022-06-22 15:25  336土豆快跑  阅读(119)  评论(0编辑  收藏  举报