Correlation Name

You can access the column values defined in the target table by using a correlation name in the trigger definition. A correlation name is the instance that is actually affected by the database operation calling the trigger. A correlation name can also be specified in a trigger condition or action.

The types of correlation names are new, old and obj. These correlation names can be used only in instance triggers that have an INSERT, UPDATE or DELETE event.

As shown in the table below, the use of correlation names is further restricted by the event time defined for the trigger condition.

 

BEFORE

AFTER or DERERRED

INSERT

new

obj

UPDATE

obj
new

obj
old
(AFTER)

DELETE

obj

N/A

Correlation Name

Representative Attribute Value

obj

Refers to the current attribute value of an instance. This can be used to access attribute values before an instance is updated or deleted. It is also used to access attribute values after an instance has been updated or inserted.

new

Refers to the attribute value proposed by an insert or update operation. The new value can be accessed only before the instance is actually inserted or updated.

old

Refers to the attribute value that existed prior to the completion of an update operation. This value is maintained only while the trigger is being performed. Once the trigger is completed, the old values get lost.