PL/SQL WHILE loop is used to execute statements as long as given condition is true and the condition is checked at the beginning of each iteration, We use PLSQL While loop when we are not sure about that how many times statements should be executed, In while loop condition is evaluated before entering the loop section and terminates when the given condition becomes False or null.
The syntax of PLSQL While loop is like this, First is the condition and next is the set of statements that user wants to execute.
statements to execute
Look at this sample code for better understanding
PL/SQL While loop example
and output is
Cheers 🙂 Happy Learning
An Oracle ACE, Blogger, Reviewer, Technical Lead working on Oracle ADF