DEV Community

AntDB
AntDB

Posted on

AntDB-Oracle Compatibility Developer’s Manual P4–16

Basic Statements

This section begins the discussion of programming statements used in SPL programs.

NULL

The simplest statement is the NULL statement. This statement is an execution statement and does not produce an actual operation.

NULL;

The following is the simplest SPL program.

BEGIN NULL; END; 
Enter fullscreen mode Exit fullscreen mode

When a statement like IF-THEN-ELSE is executed, the NULL statement can operate as a placeholder.

Example:

\set PLSQL_MODE on CREATE OR REPLACE PROCEDURE divide_it ( p_numerator IN NUMBER, p_denominator IN NUMBER, p_result OUT NUMBER ) IS BEGIN IF p_denominator = 0 THEN NULL; ELSE p_result := p_numerator / p_denominator; END IF; END; / \set PLSQL_MODE off 
Enter fullscreen mode Exit fullscreen mode

Top comments (0)