Table with FK and INSERT/UPDATE trigger
--=== Given a table with a FK and a trigger.
--=== 1. If an INSERT/UPDATE is done that violates the FK, the trigger fires, which is not what I would expect.
--=== 2. But for MERGE, the trigger does not fire. So there is clearly an inconsistency.
--=== 3. Can you please describe this behaviour for INSERT/UPDATE, and difference between INSERT/UPDATE and MERGE.
--========== INSERT and UPDATE raise:
--========== ORA-02291: integrity constraint (K.T2#F#1) violated - parent key not found
DROP TABLE T1 CASCADE CONSTRAINTS;
DROP TABLE T2 CASCADE CONSTRAINTS;
-- Create table t1 (will remain empty for the test)