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
OPEN-FOR Statement The OPEN-FOR statements execute the multi-row query related with a cursor variable. It also allocates the resources used by the Oracle to process the query a

Pl/sql Conditional Control: IF statements Frequently, it is necessary to take the alternative actions depending on the circumstances. The IF statement execute a series of statem

to write a heap sort program usin pl-sql

Transaction Control The Oracle is transaction oriented; that is, Oracle uses the transactions to make sure the data integrity. The transaction is a sequence of SQL data manip

What are 3 good practices of modeling and/or implementing data warehouses?

(a) What are decision support systems, and what role do they play in the business environment? (b) Data warehousing is defined as "a subject-oriented, integrated, non-volatile c

Keyword & Parameter Description: PRAGMA: These keywords signify that the statement is a pragma (i.e. compiler directive). The Pragmas are processed at the compile time, n

Procedures   The procedure is a subprogram which performs a specific action. You write procedures using the syntax as shown below: PROCEDURE name [(parameter[, parameter, .

Project Description: We organize an online system called ACPAS we have created a project called EVO that can be use by our customers to integrate their web sites with the Acpas

Parameter and Keyword Description: procedure_name The user-defined procedure is declared by this construct. parameter_name: This identifies the formal parameter t