How to check if a columns value was explicitly specified in a PL/SQL BEFORE UPDATE trigger?

oracle, plsql, triggers

Solution

Use the `UPDATING` function:

if updating('LAST_MODIFIED_BY') then 
...
end if;

More details are in the manual: http://docs.oracle.com/cd/E11882_01/appdev.112/e25519/triggers.htm#BCFIDDBB

Problem

Is there a way to tell which columns were explicitly updated in a PL/SQL `BEFORE UPDATE` trigger? For example: I want to set `:new.last_modified_by := USER` only if the `UPDATE` statement did not explicitly specify a value for this column.

Original source