PL SQL MCQ Questions 9
Which of the following is used to define code that is fired when certain actions or event occur?
- Replace
- Keyword
- Trigger
- Cursor
Ans : 3
………………….. are used to recreate if trigger already exists.
- Cursor
- Trigger
- Keywords
- Replace
Ans : 4
For which trigger timing can you reference the NEW and OLD qualifiers?
- Statement and Row
- Statement only
- Row only
- Oracle Forms trigger
Ans : 4
Which of the following is not a benefit of a database trigger?
- Enforcing referential integrity
- Event logging and storing information on table access
- Allowing invalid transactions
- Generating some derived column values automatically
Ans : 3
Does the Database trigger will fire when the table is TRUNCATED ?
- Yes
- No
- Depends upon
- Invalid option
Ans : 2
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
The OLD and NEW qualifiers can be used in which type of trigger?
- ROWLEVEL DML TRIGGERS
- STATEMENT LEVEL DML TRIGGERS
- ROW LEVEL SYSTEM TRIGGERS
- STATEMENT LEVEL DML TRIGGERS
Ans : 1
What command is used to removing trigger?
- DROP TRIGGER Trig;
- ALTER TRIGGER Trig;
- DELETE TRIGGER Trig;
- None of the above
Ans : 1
You create a DML trigger. For the timing information, which is valid with a DML trigger?
- DURING
- INSTEAD
- ON SHUTDOWN
- BEFORE
Ans : 4
Which statement about triggers is true?
- You use an application trigger to fire when a DELETE statement occurs.
- You use a database trigger to fire when an INSERT statement occurs.
- You use a system event trigger to fire when an UPDATE statement occurs.
- You use INSTEAD OF trigger to fire when a SELECT statement occurs.
Ans : 2
Which triggering event can cause a trigger to fire?
- A user executes a CREATE or an ALTER table statement.
- User executes a SELECT statement with an ORDER BY clause.
- A user executes a JOIN statement that uses four or more tables.
- None of the above
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
What part of a database trigger determines the number of times the trigger body executes?
- Trigger type
- Trigger body
- Trigger event
- Trigger timing
Ans : 1
You need to create a trigger on the EMP table that monitors every row that is changed
- FOR EACH ROW trigger on the EMP table.
- Statement level trigger on the EMP table.
- FOR EACH ROW Statement trigger on the EMP table.
- None of the above
Ans : 1
Which situation requires a before update statement level trigger on the table?
- When you need to populate values of each updated row into another table.
- When a trigger must fire for each row affected by the triggering statement.
- When you need to make modifications to the table as necessary privileges.
- When you need to store the information of the use who successfully modified tables
Ans : 3
How to disable all triggers on EMP Table?
- ALTER TABLE EMP DISABLE TRIGGERS ALL;
- ALTER TABLE EMP DISABLE ALL TRIGGERS;
- DISABLE TRIGGERS;
- DISABLE TRIGGERS ON EMP;
Ans :2
How to enable all triggers on emp table?
- You cannot enable multiple triggers on a table in one command.
- ALTER TRIGGERS ON TABLE employees ENABLE;
- ALTER employees ENABLE ALL TRIGGERS;
- ALTER TABLE employees ENABLE ALL TRIGGERS;
Ans :4
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
What is the maximum no. of statements that can be specified in a trigger statement?
- ONE
- TWO
- ZERO
- FOUR
Ans : 1
What are mutating triggers?
- Triggers are not mutable
- A trigger giving a SELECT on the table on which the trigger is written.
- A & B
- None of the above
Ans : 1
Can a trigger written for a view?
- YES
- NO
- Depends upon
- Invalid option
Ans : 1
What is the maximum no of cascading triggers at a time?
- 32
- 40
- 50
- 12
Ans : 1
Can database trigger written on synonym of a table and if it can be then what would be the effect?
- Yes
- No
- Depends upon
- Invalid option
Ans : 1
Attend Free Demo and Learn SQL SERVER ONLINE TRAINING by Real-Time Expert
Can we use Commit in a Database Trigger?
- Yes
- No
- Depends upon
- Invalid option
Ans : 2
What kind of trigger is typically used to enforce complex integrity constraints?
- AFTER ROW triggers.
- BEFORE ROW triggers.
- INSTEAD OF triggers.
- None of the above.
Ans : 2
What is SCHEMA Trigger?
- Created on a schema and fires whenever the user who owns it is initiates the triggering event.
- Created on table
- Created on ddl operations
- None of the above
Ans : 1