PL/SQL (MOSC)

MOSC Banner

trigger before insert or update

edited Mar 15, 2012 5:23AM in PL/SQL (MOSC) 6 commentsAnswered
Using Oracle 11g I have a trigger that is before insert or update.  Rather than code two triggers is there a system variable, like trigger fire type, to test whether the trigger is firing because of an insert or update.  Currently I test the old id column for being null, but assume there is another more appropriate way?

IF :OLD.column_id IS NOT NULL THEN

*** perform logic for insert

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center