SELECT CONCAT( ‘ALTER TABLE ‘ ,TABLE_NAME ,‘ ENGINE=INNODB, ROW_FORMAT=DYNAMIC; ‘) as `sql-commands-for-convert-engine` FROM information_schema.TABLES AS t WHERE TABLE_SCHEMA = ‘db_log‘ and TABLE_TYPE = ‘BASE TABLE‘; 批量显示对应数据库db_log下所有表的执行语句
这个作用就是批量修改某些表的某些字段