Trigger mode
|
Operation
|
Trigger action
|
Lock type
|
Result
|
---|---|---|---|---|
AFTER
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Optimistic
|
Record is updated.
|
AFTER
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Pessimistic
|
Record is updated.
|
BEFORE
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Optimistic
|
Record is not updated since the WHERE condition of the UPDATE within the trigger body returns a NULL resultset (as the desired row is not yet inserted in the table).
|
BEFORE
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Pessimistic
|
Record is not updated since the WHERE condition of the UPDATE within the trigger body returns a NULL resultset (as the desired row is not yet inserted in the table).
|
AFTER
|
INSERT
|
DELETE the same row that is being inserted
|
Optimistic
|
Record is deleted.
|
AFTER
|
INSERT
|
DELETE the same row that is being inserted
|
Pessimistic
|
Record is deleted.
|
BEFORE
|
INSERT
|
DELETE the same row that is being inserted
|
Optimistic
|
Record is not deleted since the WHERE condition of the DELETE within the trigger body returns a NULL resultset (as the desired row is not yet inserted in the table).
|
BEFORE
|
INSERT
|
DELETE the same row that is being inserted
|
Pessimistic
|
Record is not updated since the WHERE condition of the UPDATE within the trigger body returns a NULL resultset (as the desired row is not yet inserted in the table).
|
AFTER
|
INSERT
|
INSERT a row
|
Optimistic
|
Too many nested triggers.
|
AFTER
|
INSERT
|
INSERT a row
|
Pessimistic
|
Too many nested triggers.
|
BEFORE
|
INSERT
|
INSERT a row
|
Optimistic
|
Too many nested triggers.
|
BEFORE
|
INSERT
|
INSERT a row
|
Pessimistic
|
Too many nested triggers.
|
AFTER
|
UPDATE
|
UPDATE the same row by adding a number to the value
|
Optimistic
|
Generates Solid Table Error: Too many nested triggers.
|
AFTER
|
UPDATE
|
UPDATE the same row by adding a number to the value
|
Pessimistic
|
Generates Solid Table Error: Too many nested triggers.
|
BEFORE
|
UPDATE
|
UPDATE the same row by adding a number to the value.
|
Optimistic
|
Record is updated, but does not get into a nested loop because the WHERE condition in the trigger body returns a NULL resultset and no rows are updated to fire the trigger recursively.
|
BEFORE
|
UPDATE
|
UPDATE the same row by adding a number to the value.
|
Pessimistic
|
Record is updated, but does not get into a nested loop because the WHERE condition in the trigger body returns a NULL resultset and no rows are updated to fire the trigger recursively.
|
AFTER
|
UPDATE
|
DELETE the same row that is being updated.
|
Optimistic
|
Record is deleted.
|
AFTER
|
UPDATE
|
DELETE the same row that is being updated.
|
Pessimistic
|
Record is deleted.
|
BEFORE
|
UPDATE
|
DELETE the same row that is being updated.
|
Optimistic
|
Concurrency conflict error.
|
BEFORE
|
UPDATE
|
DELETE the same row that is being updated.
|
Pessimistic
|
Concurrency conflict error.
|
AFTER
|
DELETE
|
INSERT a row with the same value.
|
Optimistic
|
Same record is inserted after deleting.
|
AFTER
|
DELETE
|
INSERT a row with the same value.
|
Pessimistic
|
Hangs at the time of firing the trigger.
|
BEFORE
|
DELETE
|
INSERT a row with the same value.
|
Optimistic
|
Same record is inserted after deleting
|
BEFORE
|
DELETE
|
INSERT a row with the same value.
|
Pessimistic
|
Hangs at the time of firing the trigger.
|
AFTER
|
DELETE
|
INSERT a row with the same value.
|
Optimistic
|
Record is deleted.
|
AFTER
|
DELETE
|
UPDATE the same row by adding a number to the value.
|
Pessimistic
|
Record is deleted.
|
BEFORE
|
DELETE
|
UPDATE the same row by adding a number to the value.
|
Optimistic
|
Record is deleted.
|
BEFORE
|
DELETE
|
UPDATE the same row by adding a number to the value
|
Pessimistic
|
Record is deleted.
|
AFTER
|
DELETE
|
DELETE same row
|
Optimistic
|
Too many nested triggers.
|
AFTER
|
DELETE
|
DELETE same record
|
Pessimistic
|
Too many nested triggers
|
BEFORE
|
DELETE
|
DELETE same record
|
Optimistic
|
Concurrency conflict error.
|
BEFORE
|
DELETE
|
DELETE same record
|
Pessimistic
|
Concurrency conflict error.
|
Trigger
|
Operation
|
Trigger action
|
Lock type
|
Result
|
---|---|---|---|---|
AFTER
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Optimistic
|
Record is updated.
|
Trigger
|
Operation
|
Trigger Action
|
Lock Type
|
Result
|
---|---|---|---|---|
BEFORE
|
INSERT
|
UPDATE the same row by adding a number to the value
|
Optimistic
|
Record is not updated since the WHERE condition of the UPDATE within the trigger body returns a NULL resultset (as the desired row is not yet inserted in the table).
|