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 MySQL mode.
OceanBase Database has the following three types of PL flow control statements:
Conditional selection
A conditional selection statement runs different statements based on different runtime conditions. Conditional selection statements include
IFandCASE.Loop control
A loop control statement repeatedly executes a series of statements based on conditions. Loop statements include
FOR LOOP,WHILE LOOP, and basicLOOP.Sequential control
A sequential control statement allows transfers to the specified statement or does nothing. Sequential control statements include
GOTOandNULL.