I have this select that returns me the name of the tables that interest me:
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME LIKE '%_AUD' AND COLUMN_NAME = 'REVTYPE' GROUP BY TABLE_NAME;
From this result I would like to put together a script with many ALTER TABLE <TABELA> ALTER COLUMN REV smallint;
.
How can I create this script?