WHILE … DO
Looping construct
[label:] WHILE (<condition>) DO <compound_statement>
| Argument | Description |
|---|---|
label |
Optional label for |
condition |
A logical condition returning |
compound_statement |
A single statement, or statements wrapped in |
A WHILE statement implements the looping construct in PSQL.The statement or the block of statements will be executed as long as the condition returns TRUE.Loops can be nested to any depth.