Previous | Table of Contents | Next

Page 148

  1. In order to change execution of nested loops, you can use the EXIT and EXIT WHEN statement in conjunction with ____________.
  2. Must you have EXIT or EXIT WHEN as part of a simple LOOP?
  3. Does Oracle have a REPEAT...UNTIL loop?
  4. In a simple LOOP, where is the best location for the EXIT or EXIT WHEN statements to appear?

Exercises

  1. Create an example using GOTO that checks some variable for a value of 10 and then branches off to a NULL statement.
  2. Create a WHILE loop to calculate a factorial. For example, 6! is 6 * 5 * 4 * 3 * 2 * 1. Use an initial value of 4! for testing. Make sure to issue the command SET SERVEROUTPUT ON and use DBMS_OUTPUT.
  3. Create the same factorial calculation as Exercise 2, but use a simple LOOP statement instead.

Previous | Table of Contents | Next

Используются технологии uCoz