SQL Triggers MCQ Questions and Answers

Triggers MCQs : 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


11. The variables in the triggers are declared using

A. -
B. @
C. #
D. $

View Answer


12. The default extension for an Oracle SQL*Plus file is:

A. .txt
B. .html
C. .css
D. .sql

View Answer


13. What are the different in triggers?

A. Define, Create
B. Drop, Comment
C. Insert, Update, Delete
D. All of the mentioned

View Answer


14. Which prefixes are available to Oracle triggers?

A. : new only
B. : old only
C. Both A and B
D. None of the above

View Answer


15. Triggers ________ enabled or disabled

A. Can be
B. Cannot be
C. Ought to be
D. Always

View Answer


16. Trigger is special type of __________ procedure.

A. Function
B. Stored
C. View
D. Table

View Answer


17. Point out the correct statement.

A. Triggers are database object
B. Three types of triggers are present in SQL Server
C. A DDL trigger is an action programmed to execute when a data manipulation language (DML) event occurs in the database server
D. None of the mentioned

View Answer


18. How many types of triggers are present in SQL Server?

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

View Answer


19. How many types of DML triggers are present in SQL Server?

A. 4
B. 5
C. 6
D. 7

View Answer


20. Point out the wrong statement.

A. We can have an INSTEAD OF insert/update/delete trigger on a table that successfully executed
B. DML Triggers are used to evaluate data after data manipulation using DML statements
C. INSTEAD OF triggers cause their source DML operation to skip
D. AFTER triggers cause their source DML operation to skip

View Answer





Discussion



* You must be logged in to add comment.