多张表批量添加单一字段
SELECT CONCAT('alter table ',table_schema,'.',table_name,' ADD COLUMN `bank_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL ; ')
from information_schema.tables
where table_schema='database_xxx'
and table_name like 'ti_mybank_%';
information_schema //所有数据库名
table_schema //所要操作的数据库名称
执行上面操作后可以得到批量修改语句
复制后贴入执行即可。