From the course: Oracle Database 19c: PL/SQL
Unlock this course with a free trial
Join today to access over 25,300 courses taught by industry experts.
Programming constructs: CONTINUE and EXIT - Oracle Database Tutorial
From the course: Oracle Database 19c: PL/SQL
Programming constructs: CONTINUE and EXIT
- [Instructor] A WHILE loop will exit on the condition in the WHILE clause, and FOR loops will exit when the iterator has reached the end. But if you want to alter the sequence of events in any loop, you can use continue and exit. You can also use GOTO, which X similarly to exit. Here are the three types of loops you'll use in PL/SQL. Simple loops with just loop and end loop. FOR loops which iterate over a counter and a WHILE loop that starts and keeps looping depending on the condition specified in the WHILE clause. With a simple loop, you must find another way to exit and I'll show you how that works with the exit statement. You can use continuing exit with any type of loop. Regardless of the type of loop, here are the things you can do in a loop. Run one or more statements in the loop. When you get to the end of the loop, do them all again. Or part way through the loop, you check some kind of condition, and if it's true, start again at the top. You'll use continue for this…
Contents
-
-
-
-
-
-
-
(Locked)
Programming contstructs: FOR loop5m 57s
-
(Locked)
Programming constructs: WHILE loop5m 1s
-
(Locked)
Programming constructs: LOOP4m 12s
-
(Locked)
Programming constructs: IF statement3m 25s
-
(Locked)
Programming constructs: CONTINUE and EXIT3m 31s
-
(Locked)
New features of PL/SQL loop constructs3m 14s
-
(Locked)
-
-
-
-