Updating an oracle sequence via plsql
[Via: Easy Oracle PL/SQL Programming: Get Started Fast with Working PL/SQL Code By John Garmany] For loop Numeric FOR_LOOP loops iterate over a specified range of integers.The range is part of an iteration scheme, which is enclosed by the keywords FOR and LOOP.But since I wasn’t aware of the CACHING issue, I instead used a manual generation of sequence number by creating a custom function for it.
It’s something that the interface system cannot handle.Basically, your session is assigned with a range of numbers, say 20(default).So when you logout of your session and then login and hit the sequence again, you’ll have a gap of 20.The range is evaluated when the FOR loop is first entered and is never re-evaluated.
The loop body is executed once for each integer in the range defined by lower_bound..upper_bound.
An EXIT, GOTO, or RAISE statement branches out of the loop. [Via] Syntax of PL/SQL Basic loop The Number is 1 The Number is 2 The Number is 3 The Number is 4 The Number is 5 The Number is 6 The Number is 7 The Number is 8 The Number is 9 The Number is 10 Exiting the Basic loop.