I would like to find a more professional way to manipulate in certain columns in selected tables.
I know how to choose tables that start with a specific letter pattern:
SELECT TABLE_NAME
FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_NAME LIKE 'prefix_mm_%'
And I know how to copy data from one column to another while changing the data type (here from UNIXTIME to TIMESTAMP):
UPDATE pages
SET date_created = FROM_UNIXTIME(other_date_created_column)
But I have many such prefix_mm_%
tables and would prefer not to do this manually for each and every one.
So I wonder: is there a way to select all the relevant tables and then manipulate the columns all at once?