what is a trigger ?
A Trigger is a stored block of SQL code that is activated in response to an INSERT, UPDATE or DELETE event on a table's record.
Triggers are similar to stored procedures in term of procedural code but are activated by an event rather than being called explicitly by a web visitor. For example you can have some business logic to do before or after inserting a new record in a database table.
Our example will demonstrate how a trigger will automatically copy a deleted record to another backup table with the same structure.