Which of the following loop does not exist in Oracle?

Options
- FOR LOOP
- WHILE LOOP
- REPEAT_UNTIL LOOP
- REVERSE LOOP


CORRECT ANSWER : REPEAT_UNTIL LOOP

Discussion Board
REPEAT_UNTIL Loop

Oracle doesn't have a REPEAT_UNTIL LOOP, but you can emulate one with a LOOP statement.
Syntax:
LOOP
{...statements...}
EXIT [ WHEN boolean_condition ];
END LOOP;

where,
statements: The statements of code to execute each pass through the loop.
boolean_condition: It is optional. It is the condition to terminate the loop.

You would use an emulated REPEAT_UNTIL LOOP when you do not know how many times you want the loop body to execute. The REPEAT_UNTIL LOOP would terminate when a certain condition was met.

Prajakta Pandit 02-23-2017 06:49 AM

Write your comments

 
   
 
 

Enter the code shown above:
 
(Note: If you cannot read the numbers in the above image, reload the page to generate a new one.)


Advertisement