Alter multiple tables' columns length
- by gdoron
So, we just found out that 254 tables in our Oracle DBMS have one column named "Foo" with the wrong length- Number(10) instead of Number(3).
That foo column is a part from the PK of the tables.
Those tables have other tables with forigen keys to it.
What I did is:
backed-up the table with a temp table.
Disabled the forigen keys to the table.
Disabled the PK with the foo column.
Nulled the foo column for all the rows.
Restored all the above
But now we found out it's not just couple of tables but 254 tables.
Is there an easy way, (or at least easier than this) to alter the columns length?
P.S. I have DBA permissions.