Is there a way to test if modifying table column will succeed in SQL?

I have a tool that applies a lot of changes to a database. Many changes concern modifying column types, sizes, etc. Is there any (possibly Oracle-specific) way to tell in advance if given ALTER TABLE change will succeed and not fail because of too long values, functional indices and so on?

With non-DDL modifications this is simple: start a transaction, execute your changes and rollback. The answer is known from whether you get an exception or not. However, DDL modifications cannot be part of transactions, so I cannot follow the same procedure here.

Source: oracle

Leave a Reply