select column_name,data_type,CONCAT(‘alter table `‘,table_name,‘` modify column `‘,column_name,‘` datetime;‘) from information_schema.`COLUMNS` where TABLE_SCHEMA=‘pv_2‘ and data_type = ‘timestamp‘;
TABLE_SCHEMA 为数据库名称
data_type 为条件数据类型
datetime 为目标数据类型