Oracle PL/SQL Procedures MCQs with answers Page - 5

Here, you will find a collection of MCQ questions on Oracle PL/SQL Procedures. Go through these questions to enhance your preparation for upcoming examinations and interviews.

To check the correct answer, simply click the View Answer button provided for each question.

Have your own questions to contribute? Click the button below to share your MCQs with others!

+ Add Question

A

Arogya • 3.19K Points
Extraordinary

Q. You need to prevent employees from inserting salary greater than 100000 in EMP table automatically. What should you use?

  • (A) Check Constraint
  • (B) Before Insert Trigger
  • (C) After Insert Trigger
  • (D) Procedure

A

Arogya • 3.19K Points
Extraordinary

Q. A bank wants to log every money transfer into an AUDIT table whenever BALANCE column is updated. Which is best?

  • (A) After Update Row Trigger
  • (B) Before Update Statement Trigger
  • (C) Function
  • (D) View

A

Arogya • 3.19K Points
Extraordinary

Q. You must automatically generate a primary key using a sequence while inserting rows. What is the best approach?

  • (A) Procedure
  • (B) Before Insert Trigger
  • (C) After Insert Trigger
  • (D) Cursor

A

Arogya • 3.19K Points
Extraordinary

Q. A developer queries the same table inside a row-level trigger and gets ORA-04091 error. Why?

  • (A) Deadlock
  • (B) Mutating table error
  • (C) Syntax error
  • (D) Constraint violation

A

Arogya • 3.19K Points
Extraordinary

Q. Which is best to avoid mutating table error?

  • (A) Cursor
  • (B) Compound Trigger
  • (C) Function
  • (D) View

A

Arogya • 3.19K Points
Extraordinary

Q. You want to stop DELETE operation on a table after office hours. What should be used?

  • (A) Before Delete Trigger
  • (B) After Delete Trigger
  • (C) View
  • (D) Sequence

A

Arogya • 3.19K Points
Extraordinary

Q. Which PL/SQL block handles runtime errors?

  • (A) DECLARE
  • (B) BEGIN
  • (C) EXCEPTION
  • (D) END

A

Arogya • 3.19K Points
Extraordinary

Q. What will happen if NO_DATA_FOUND exception is not handled?

  • (A) Program continues
  • (B) Transaction commits
  • (C) Program terminates with error
  • (D) Table locked

A

Arogya • 3.19K Points
Extraordinary

Q. You want to process each employee row fetched from SELECT. What should you use?

  • (A) Cursor
  • (B) Sequence
  • (C) Trigger
  • (D) View

A

Arogya • 3.19K Points
Extraordinary

Q. Which cursor type is created automatically by Oracle?

  • (A) Explicit Cursor
  • (B) Implicit Cursor
  • (C) Parameterized Cursor
  • (D) Dynamic Cursor

Add MCQ in this Category

If you want to share an MCQ question in this category, it's a great idea! It will be helpful for many other students using this website.

Share Your MCQ