This set of Database Multiple Choice Questions & Answers (MCQs) focuses on “Triggers”.
1. A __________ is a special kind of a store procedure that executes in response to certain action on the table like insertion, deletion or updation of data.
a) Procedures
b) Triggers
c) Functions
d) None of the mentioned
View Answer
Explanation: Triggers are automatically generated when a particular operation takes place.
2. Triggers are supported in
a) Delete
b) Update
c) Views
d) All of the mentioned
View Answer
Explanation: The triggers run after an insert, update or delete on a table. They are not supported for views.
3. The CREATE TRIGGER statement is used to create the trigger. THE _____ clause specifies the table name on which the trigger is to be attached. The ______ specifies that this is an AFTER INSERT trigger.
a) for insert, on
b) On, for insert
c) For, insert
d) None of the mentioned
View Answer
Explanation: The triggers run after an insert, update or delete on a table. They are not supported for views.
4. What are the after triggers?
a) Triggers generated after a particular operation
b) These triggers run after an insert, update or delete on a table
c) These triggers run after an insert, views, update or delete on a table
d) All of the mentioned
View Answer
Explanation: AFTER TRIGGERS can be classified further into three types as: AFTER INSERT Trigger, AFTER UPDATE Trigger, AFTER DELETE Trigger.
5. The variables in the triggers are declared using
a) –
b) @
c) /
d) /@
View Answer
Explanation: Example : declare @empid int; where empid is the variable.
6. The default extension for an Oracle SQL*Plus file is:
a) .txt
b) .pls
c) .ora
d) .sql
View Answer
Explanation: Example :None.
7. Which of the following is NOT an Oracle-supported trigger?
a) BEFORE
b) DURING
c) AFTER
d) INSTEAD OF
View Answer
Explanation: Example: During trigger is not possible in any database.
8. What are the different in triggers?
a) Define, Create
b) Drop, Comment
c) Insert, Update, Delete
d) All of the mentioned
View Answer
Explanation: Triggers are not possible for create, drop.
9. Triggers ________ enabled or disabled
a) Can be
b) Cannot be
c) Ought to be
d) Always
View Answer
Explanation: Triggers can be manipulated.
10. Which prefixes are available to Oracle triggers?
a) : new only
b) : old only
c) Both :new and : old
d) Neither :new nor : old
View Answer
Explanation: None.
Sanfoundry Global Education & Learning Series – Database Management System.
If you find a mistake in question / option / answer, kindly take a screenshot and email to [email protected]
- Check DBMS Books
- Check Computer Science Books
- Apply for Computer Science Internship
- Check Programming Books
- Practice Programming MCQs