select table_name, concat(‘alter table `‘,table_name,‘` MODIFY ‘, column_name, ‘ ‘, data_type ,‘ auto_increment;‘) as ‘query script‘ from information_schema.columns c where c.table_schema = ‘pv_2‘ and c.column_key =‘PRI‘ and c.data_type in ( ‘int‘,‘bigint‘) and c.extra <> ‘auto_increment‘ order by table_name;