Oracle PL/SQL - NULL Statement as Placeholder During Subprogram Creation

Introduction

In the following code, the NULL statement lets you compile this subprogram and fill in the real body later.

Demo

SQL>
SQL>--  w ww  .j  a  v a2 s .c  o m
SQL> CREATE OR REPLACE PROCEDURE award_bonus (
  2    emp_id NUMBER,
  3    bonus NUMBER
  4  ) AS
  5  BEGIN    -- Executable part starts here
  6    NULL;  -- Placeholder
  7    -- (raises "unreachable code" if warnings enabled)
  8  END award_bonus;
  9  /

Procedure created.

SQL>

Related Topic