Recursive subprograms, PL-SQL Programming

Recursive Subprograms

The recursive subprogram is the one that calls itself. Think of a recursive call as a call to a few other subprograms that does the similar task as your subprogram. Each recursive call creates a new illustration of any items declared in the subprogram, involving parameters, cursors, variables, and exceptions. Similarly, the new instances of the SQL statements are created at each level in the recursive descent.

Be cautious where you place a recursive call. If you place it within a cursor FOR loop or between the OPEN and CLOSE statements, the other cursor is opened at each call. As a result, your program may exceed the limit set by the Oracle initialization parameter OPEN_CURSORS.

There should be at least two paths through a recursive subprogram: one that lead to the recursive call and one that does not. At least one path should lead to a terminating condition. Or else, the recursion would (theoretically) go on everlastingly. In practice, if a recursive subprograms stray into vast regress, the PL/SQL eventually runs out of memory and raises the predefined exception STORAGE_ERROR.

Posted Date: 10/5/2012 5:47:09 AM | Location : United States







Related Discussions:- Recursive subprograms, Assignment Help, Ask Question on Recursive subprograms, Get Answer, Expert's Help, Recursive subprograms Discussions

Write discussion on Recursive subprograms
Your posts are moderated
Related Questions
Explicit Cursor Attributes The cursor variable or each cursor has four attributes: %FOUND, %ISOPEN, %ROWCOUNT, and %NOTFOUND. When appended to the cursor or cursor variable, th

THEORY OF SPONTANEOUS GENERATION - ABIOGENESIS OR AUTOGENESIS - According to this theory, the existing living communities have originated from non-living organic matter with

Seeking a programmer to design a legal document with pre-existing fields that could allow the auto-population of client(s) information (i.e. Name, Account Number, Address etc.) int

EXIT The EXIT statement forces a loop to done unconditionally. Whenever an EXIT statement is encountered, the loop is done immediately and controls the passes to the next statem

Iterative Control: LOOP  Statements The LOOP statement executes a series of statements multiple times. There are 3 forms of LOOP statements: LOOP, WHILE-LOOP, & FOR-LOOP. LOOP

i NEED THE QURIES TO SOME OF THE PROBLEMS USING plsql

At times, customers make mistakes in submitting their orders and call to cancel the order. Brewbean's wants to create a trigger that automatically updates the stock level of all pr

Assignment Statement: The assignment statement sets the present value of the variable, parameter, field, or element. The statement consists of an assignment target followed by

What Are Cursor Variables  ? The Cursor variables are like C or Pascal pointers that hold the memory location (address) of some item rather of the item itself. Therefore, decl

DBMS_PIPE: The Package DBMS_PIPE allows various sessions to communicate over the named pipes. (A pipe is a region of memory used by one of the process to pass information to