Before statement-level trigger v16
This example shows a simple before statement-level trigger that displays a message before an insert operation on the emp
table:
The following INSERT
is constructed so that several new rows are inserted upon a single execution of the command. For each row that has an employee id between 7900 and 7999, a new row is inserted with an employee id incremented by 1000. The following are the results of executing the command when three new rows are inserted:
The message New employees are about to be added
is displayed once by the firing of the trigger even though the result adds three rows.