What is a trigger ?

Answer Posted / kiran

Trigger is a special type of stored procedure which is
implicitely executed when an insert , update or delete
happens on the data.
We dnt have to call trigger explicitely.
For applying some business rules we can fire trigger at
specific type.
Suppose i want a log when user inserts data on a particular
table i can use trigger.

2 types of trigger
1) DML Trigger - Applies on data -
- Instead of and After Trigger
2)DDL Trigger - Applies on database structure - on table or
database - these triggers came with sql server 2005.

Before sql server 2005 we were having only DML Triggers.

Is This Answer Correct ?    2 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Why do we use procedures in pl sql?

617


What does truncate mean in sql?

631


Can a composite key be null?

617


When a dml statement is executed, in which cursor attributes, the outcome of the statement is saved?

738


Is a foreign key always unique?

605






What are instead of triggers?

707


Can you rollback after commit?

624


What is a trigger in sql?

741


Compare sql & pl/sql

688


What is ttitle and btitle?

674


How to sort the rows in sql.

704


How many databases can sql express handle?

635


Explain autonomous transaction.

714


What is a table in a database?

665


what is union, minus and interact commands? : Sql dba

765