Triggers allow SQL code to be automatically executed in response to data changes, such as inserts, updates or deletes. There are two types of triggers: after triggers which execute after the data change, and instead of triggers which execute instead of the triggering statement. Triggers use the inserted and deleted tables to access old and new records. Triggers are created using the CREATE TRIGGER statement and can be altered, dropped or have their definition viewed.