Initiating actions in response to events.
One of the new features provided with SQL Server 2005 enables actions to be performed after an event occurs on an object, in this case the “people” table.
To illustrate an “after” response, the following code creates a trigger that responds to a new record being created.
When a new record is created, the “trigger_action” field is updated for that new record with the first name of the person and the total number of records in the table including the newly created record.
With this newly created record, you can see the first name ‘h’ and that there is now “14” records in the table.