Flow Control - MarkMpn/Sql4Cds GitHub Wiki
As well as running individual queries, SQL 4 CDS can also handle scripts containing multiple queries which are executed sequentially, and control-of-flow statements to execute queries in a loop or only when specific conditions are met.
The supported control-of-flow statements are: