Overview

2024-06-28 05:30:31  Updated

As an extension of SQL, PL introduces control statements, which enable higher flexibility in controlling the execution order of statements in a program.

Applicability

This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition provides only the MySQL mode.

OceanBase Database has the following three types of PL flow control statements:

  • Conditional control

    A conditional control statement runs different statements based on different runtime conditions. Conditional selection statements include IF and CASE.

  • Loop control

    A loop control statement repeatedly executes a series of statements based on conditions. Loop statements include FOR LOOP, WHILE LOOP, and basic LOOP.

  • Sequential control

    A sequential control statement allows transfers to the specified statement or does nothing. Sequential control statements include GOTO and NULL.

Contact Us