Database Administration (MOSC)

MOSC Banner

Before row level trigger WHEN clause => FALSE, but body still looks executed according to plan

edited Feb 8, 2021 2:51PM in Database Administration (MOSC) 11 comments

Hi

Oracle 19c

I have a row level trigger that fires before update or insert. It will change a date column after every insert/update.

Now I have added WHEN clause. So it should execute body only if user is not RAULKAUBI.

WHEN (USER != 'RAULKAUBI')

https://docs.oracle.com/en/database/oracle/oracle-database/19/lnpls/CREATE-TRIGGER-statement.html#GUID-AF9E33F1-64D1-4382-A6A4-EC33C36F237B

WHEN (condition)

Specifies a SQL condition that the database evaluates for each row that the triggering statement affects. If the value of condition is TRUE for an affected row, then trigger_body

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