AntDB-Oracle Compatibility Developer’s Manual P4–16

antdbanhui

AntDB

Posted on September 26, 2023

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
💖 💪 🙅 🚩
antdbanhui
AntDB

Posted on September 26, 2023

Join Our Newsletter. No Spam, Only the good stuff.

Sign up to receive the latest update from our blog.

Related

What was your win this week?
weeklyretro What was your win this week?

November 29, 2024

Where GitOps Meets ClickOps
devops Where GitOps Meets ClickOps

November 29, 2024

How to Use KitOps with MLflow
beginners How to Use KitOps with MLflow

November 29, 2024

Modern C++ for LeetCode 🧑‍💻🚀
leetcode Modern C++ for LeetCode 🧑‍💻🚀

November 29, 2024