After Trigger execute before constraint check in oracle

Posted by satakare on Stack Overflow See other posts from Stack Overflow or by satakare
Published on 2010-04-20T05:51:39Z Indexed on 2010/04/20 5:53 UTC
Read the original article Hit count: 286

Filed under:
|
|
|

Hi, I have After Insert/Update trigger on Table T1 which get the referential data for Col1 from T2 and does some work and insert it into another table. The col1 is FK to Table T2.

When user insert the incorrect or non existing value into the Col1 and if trigger is disabled I am getting constraint error that is fine.

But when trigger is enabled and user insert the wrong value in Col1 trigger is getting fired and shows the 'no data found' error message.

Actually I am expecting the table to throw constraint error, but trigger is throwing it.

Please let me know your comments about this trigger behaviour.

© Stack Overflow or respective owner

Related posts about Oracle

Related posts about trigger