PL SQL MCQ Questions 9

PL SQL MCQ Questions 9

PL-SQL-Objective-Questions-NareshITWhich of the following is used to define code that is fired when certain actions or event occur?

  1. Replace
  2. Keyword
  3. Trigger
  4. Cursor

Ans : 3


 ………………….. are used to recreate if trigger already exists.

  1. Cursor
  2. Trigger
  3. Keywords
  4. Replace

Ans : 4


For which trigger timing can you reference the NEW and OLD qualifiers?

  1. Statement and Row
  2. Statement only
  3. Row only
  4. Oracle Forms trigger

Ans : 4


Which of the following is not a benefit of a database trigger?

  1. Enforcing referential integrity
  2. Event logging and storing information on table access
  3. Allowing invalid transactions
  4. Generating some derived column values automatically

Ans : 3


Does the Database trigger will fire when the table is TRUNCATED ?

  1. Yes
  2. No
  3. Depends upon
  4. 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?

  1. ROWLEVEL DML TRIGGERS
  2. STATEMENT LEVEL DML TRIGGERS
  3. ROW LEVEL SYSTEM TRIGGERS
  4. STATEMENT LEVEL DML TRIGGERS

Ans : 1


What command is used to removing trigger?

  1. DROP TRIGGER Trig;
  2. ALTER TRIGGER Trig;
  3. DELETE TRIGGER Trig;
  4. None of the above

Ans : 1


You create a DML trigger. For the timing information, which is valid with a DML trigger?

  1. DURING
  2. INSTEAD
  3. ON SHUTDOWN
  4. BEFORE

Ans : 4


Which statement about triggers is true?

  1. You use an application trigger to fire when a DELETE statement occurs.
  2. You use a database trigger to fire when an INSERT statement occurs.
  3. You use a system event trigger to fire when an UPDATE statement occurs.
  4. You use INSTEAD OF trigger to fire when a SELECT statement occurs.

Ans : 2


Which triggering event can cause a trigger to fire?

  1. A user executes a CREATE or an ALTER table statement.
  2. User executes a SELECT statement with an ORDER BY clause.
  3. A user executes a JOIN statement that uses four or more tables.
  4. 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?

  1. Trigger type
  2. Trigger body
  3. Trigger event
  4. Trigger timing

Ans : 1


You need to create a trigger on the EMP table that monitors every row that is changed

  1. FOR EACH ROW trigger on the EMP table.
  2. Statement level trigger on the EMP table.
  3. FOR EACH ROW Statement trigger on the EMP table.
  4. None of the above

Ans : 1


Which situation requires a before update statement level trigger on the table?

  1. When you need to populate values of each updated row into another table.
  2. When a trigger must fire for each row affected by the triggering statement.
  3. When you need to make modifications to the table as necessary privileges.
  4. When you need to store the information of the use who successfully modified tables

Ans :  3


How to disable all triggers on EMP Table?

  1. ALTER TABLE EMP DISABLE TRIGGERS ALL;
  2. ALTER TABLE EMP DISABLE ALL TRIGGERS;
  3. DISABLE TRIGGERS;
  4. DISABLE TRIGGERS ON EMP;

Ans :2


How to enable all triggers on emp table?

  1. You cannot enable multiple triggers on a table in one command.
  2. ALTER TRIGGERS ON TABLE employees ENABLE;
  3. ALTER employees ENABLE ALL TRIGGERS;
  4. 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?

  1. ONE
  2. TWO
  3. ZERO
  4. FOUR

Ans : 1


What are mutating triggers?

  1. Triggers are not mutable
  2. A trigger giving a SELECT on the table on which the trigger is written.
  3. A & B
  4. None of the above

Ans : 1


Can a trigger written for a view?

  1. YES
  2. NO
  3. Depends upon
  4. Invalid option

Ans : 1


What is the maximum no of cascading triggers at a time?

  1. 32
  2. 40
  3. 50
  4. 12

Ans : 1


Can database trigger written on synonym of a table and if it can be then what would be the effect?

  1. Yes
  2. No
  3. Depends upon
  4. 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?

  1. Yes
  2. No
  3. Depends upon
  4. Invalid option

Ans : 2


What kind of trigger is typically used to enforce complex integrity constraints?

  1. AFTER ROW triggers.
  2. BEFORE ROW triggers.
  3. INSTEAD OF triggers.
  4. None of the above.

Ans : 2


What is SCHEMA Trigger?

  1. Created on a schema and fires whenever the user who owns it is initiates the triggering event.
  2. Created on table
  3. Created on ddl operations
  4. None of the above

Ans : 1


Attend Free Demo and Learn   SQL SERVER ONLINE TRAINING   by Real-Time Expert

Share this post


Azure-devops- online training
Python online traning
MS-Azure-online training
Angular9 online training
AWS online training

Specialization on Trending Courses

Linix online training
Advance Spring online training
fullstack online training
Core java onlne training
Android online training
C#-net online training
SQL online training