SQL Triggers MCQ Questions and Answers

This section focuses on the "Triggers" in SQL. These Multiple Choice Questions (mcq) should be practiced to improve the SQL skills required for various interviews (campus interview, walk-in interview, company interview), placement, entrance exam and other competitive examinations.

1. Which of the following specifies when the trigger will be executed?

A. BEFORE
B. AFTER
C. INSTEAD OF
D. All of the above

View Answer


2. Which of the operation are not specifies in triggers?

A. Alter
B. UPDATE
C. INSERT 
D. DELETE

View Answer


3. How can we specifies a row-level trigger?

A. Using ON ROW
B. Using FOR EACH COL
C. Using FOR EACH ROW
D. Using OR ROW

View Answer


4. OLD and NEW references are available for table-level triggers

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


5. Which of the following are Benefits of Triggers?

A. Enforcing referential integrity
B. Auditing
C. Imposing security authorizations
D. All of the above

View Answer


6. Which of the following triggers fire in response to the LOGON event that's raised when a user's session is being established?

A. Recursive Triggers
B. Multiple Triggers
C. Logon Trigger
D. Both A and C

View Answer


7. How many types of recursion occure when Recursive triggers enable?

A. 2
B. 3
C. 4
D. 5

View Answer


8. In which type of recursion the application updates table T1. This fires trigger TR1, updating table T1. Because table T1 was updated, trigger TR1 fires again, and so on?

A. Indirect recursion
B. Direct recursion
C. Both A and B
D. None of the above

View Answer


9. SQL Server allows for Transact-SQL stored procedures, triggers, and batches to refer to tables that don't exist at compile time. This ability is called?

A. Indeferred Name Resolution
B. Deferred Name Permissions
C. Deferred Name Resolution
D. Indeferred Name Permissions

View Answer


10. Trigger isn&aspo;t called recursively when?

A. If an INSTEAD OF trigger defined on a table runs a statement against the table that would ordinarily fire the INSTEAD OF trigger again
B. When an INSTEAD OF trigger defined on a view runs a statement against the view that would ordinarily fire the INSTEAD OF trigger again
C. Both A and B
D. None of the above

View Answer






Discussion


* You must be logged in to add comment.