Answers

Question and Answer:

  Home  Oracle Database

⟩ What Is an Anonymous Block?

An anonymous block is a PL/SQL code block with no name. It consists of three parts:

► Declaration Part - Defining local variables and local procedures. Declaration part is optional.

► Execution Part - Defining execution logic with executable statements. Execution part is required.

► Exception Part - Defining error handling logics. Exception part is optional.

Here how a complete anonymous block should look like:

DECLARE

-- Declaration statements

BEGIN

-- Executable statements

EXCEPTION

-- Error handling statements

END;

 175 views

More Questions for you: