SQL Server Triggers Interview Preparation Guide
Download PDF
Add New Question

SQL Server Triggers frequently Asked Questions by expert members with experience in MS SQL Server triggers. These interview questions and answers on SQL Server Triggers will help you strengthen your technical skills, prepare for the interviews and quickly revise the concepts. So get preparation for the SQL Server Triggers job interview

10 MS SQL Server Triggers Questions and Answers:

1 :: What is MS SQL Server Triggers?

A trigger is a special type of event driven stored procedure. It gets initiated when Insert, Delete or Update event occurs. It can be used to maintain referential integrity. A trigger can call stored procedure.
Executed automatically when an INSERT, UPDATE or DELETE operation takes place on a table.
You can specify which trigger fires first or fires last using sp_settriggerorder.
Triggers can't be invoked on demand.
They get triggered only when an associated action (INSERT, UPDATE, DELETE) happens.
Triggers are generally used to implement business rules, auditing.
Triggers can also be used to extend the referential integrity checks
Post Your Answer

2 :: How many triggers you can have on a table?

A table can have up to 12 triggers defined on it.
Post Your Answer

3 :: How to invoke a trigger on demand?

Triggers can't be invoked on demand. They get triggered when the associated INSERT, DELETE or UPDATE is performed.
Post Your Answer

4 :: Explain triggers?

Triggers are constructs in PL/SQL that need to be just created and associated with a table. Once they are created, when the table associated with it gets updated due to an UPDATE, INSERT or a DELETE, the triggers get implicitly fired depending upon the instructions passed to them.
Post Your Answer

5 :: Describe triggers features and limitations?

Trigger features:-

1. Can execute a batch of SQL code for an insert, update or delete command is executed
2. Business rules can be enforced on modification of data

Trigger Limitations:-
1. Does not accept arguments or parameters
2. Cannot perform commit or rollback
3. Can cause table errors if poorly written
Post Your Answer
Add New Question