Oracle - ignoring constraint failures Oracle - ignoring constraint failures oracle oracle

Oracle - ignoring constraint failures


You can use DML error logging:

exec dbms_errlog.create_error_log(dml_table_name => 'STAFF'    ,err_log_table_name => 'STAFF_ERRORS');delete from STAFFlog errors into STAFF_ERRORS('Is referenced') reject limit 999999999;

Then optionally delete, truncate, or drop the table STAFF_ERRORS.


You can use PLSQL:

BEGIN  FOR r IN (SELECT id FROM STAFF) LOOP    begin       delete STAFF where id = r.id;    exception       when others then          null;    end;  END LOOP;END;

But it might take some time to complete ...