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

Is sql dba a good career? : SQL DBA

542


How do you select unique values in sql?

504


What is procedure explain with program?

556


Is there a pl/sql pragma similar to deterministic, but for the scope of one single sql select?

538


Is coalesce faster than isnull?

514






Can a trigger call a stored procedure?

542


what are the non-standard sql commands supported by 'mysql'? : Sql dba

579


Explain the commit statement.

617


What are the methods of filing?

524


Why plvtab is considered as the easiest way to access the pl/sql table?

626


What are the disadvantages of not performing database normalization?

599


Which one is better subquery or joins?

560


Can you have a foreign key without a primary key?

512


What is identity column in sql server?

539


What is the use of function in sql?

543