I am trying to run a block of code in oracle and it exits the block if it throws some error. How do I overcome it? I tried adding some exceptions and it didn't work. Below is the code and its error.
> begin for i in (
> select constraint_name , table_name
> from user_constraints
> where constraint_type ='C'
> and status = 'ENABLED' ) LOOP dbms_utility.exec_ddl_statement('alter table "'|| i.table_name || '"
> disable constraint ' || i.constraint_name); end loop; end; /
and it throws the following error which should be ignored and the block should continue executing.
begin
*
ERROR at line 1:
ORA-30671: cannot modify NOT NULL constraint on an identity column
ORA-06512: at "SYS.DBMS_UTILITY", line 574
ORA-06512: at line 9
I tried adding Exceptions which didn't work well.