Understanding Triggers

A trigger is a specialized stored procedure that activates (executes) in response to an event. There are two basic trigger types, ie data manipulation language (DML) trigger and data definition language (DDL) trigger, based on the type of event that causes them to fire. For example, a data manipulation language (DML) trigger fires in response to INSERT, UPDATE, or DELETE events on a specific table whereas a data definition language (DDL) trigger fires in response to a data definition event, such as creating or dropping an object.

DDL triggers can have a scope of a database or the server. DDL triggers were introduced as a new feature with SQL Server 2005. The scope of a DML trigger is a table. Earlier versions of SQL Server support only DML triggers.

Click here to read full article at SSWUG.org

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s