select distinct  CONCAT( 'ALTER TABLE ', table_name, ' CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;' )  from information_schema.`COLUMNS` where TABLE_SCHEMA='数据库名';

By xbingo

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注