PLSQLExamples.htm
PL/SQL Examples
-
PL2c This uses a cursor variable (i.e., a REF CURSOR type) to do the same work as in PL2.
-
PL3 This uses a regular cursor and a parameterized cursor to build up lines of output joining two tables.
-
PL3b. This uses subqueries to achieve the same effects as in PL3..
-
PL4 This runs through table R(a, d). If any element has a > d it is deleted and re-inserted as (d, a).
-
PL5 This is a simple procedure.
-
PrintFib This is a procedure that inputs Fibonacci numbers.
-
PL6 This procedures walks through the elements of table R and eliminates any that are also in table S. A local procedure with an output parameter is used to determine if an element is in S.
-
PL7 This is just like PL6 only it uses a function rather than a procedure to test whether elements are in table S.
-
PL8 This illustrates exception handling in PL/SQL.
-
PL8b. This illustrates raising (throwing) exceptions.
-
PL9 This procedure updates a view by updating its base tables. The view is produced as a natural join. Tuples are only added to the base tables if they are not already present.
-
PL10 This is the interface for a package.
-
PL10b. This is the body for the package defined in PL10