A trigger provides a means to execute an SQL statement or set of statements when you insert, update, or delete rows in a table. Triggers provide the following benefits:
A trigger can examine row values to be inserted or updated, and it can determine what values were deleted or what they were updated to.
A trigger can change values before they are inserted into a table or used to update a table. For example, you can check for out-of-bounds values and modify them to be within bounds. This capability enables the use of triggers as data filters.
You can modify how INSERT, DELETE, or UPDATE work. For example, during an INSERT, you can provide a default value that is based on the current time for columns with any temporal data type. Normally, only TIMESTAMP columns can be initialized to the current time automatically.