PL extends SQL with control statements, allowing for more flexible control over the execution order of statements within a program.
Applicability
This content applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
The PL flow control statements in OceanBase Database are mainly divided into the following three categories:
Conditional selection
Based on different runtime conditions, different statements can be controlled. The keywords for conditional selection statements are
IFandCASE.Loop control
A series of statements can be repeated based on conditions. The loop statements include
FOR LOOP,WHILE LOOP, and the basicLOOP.Sequential control
Sequential control statements allow for transferring to a specified labeled statement or performing no action. These include
GOTOandNULL.
