Recursive subprograms, PL-SQL Programming

Assignment Help:

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.


Related Discussions:- Recursive subprograms

How to use the explain plan for statement, Using the student and faculty ta...

Using the student and faculty tables create a select query that outputs all students for a specific advisor. Generate the execution plan, select out the explain plan . Create an

Select into statement - syntax, SELECT INTO Statement   The SELECT INT...

SELECT INTO Statement   The SELECT INTO statement retrieve data from one or more database tables, and then assigns the selected values to the variables or fields. Syntax:

Set operators - sql operators, Set Operators The Set operators combine...

Set Operators The Set operators combine the results of the two queries into one result. The INTERSECT returns all the distinct rows selected by both queries. The MINUS returns

Open-for statement, OPEN-FOR Statement The OPEN-FOR statements execute ...

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

Example of group by and collect operator, Example of GROUP BY and COLLECT O...

Example of GROUP BY and COLLECT Operator Example: Using GROUP BY and COLLECT to obtain C_ER2 SELECT CourseId, CAST ( COLLECT (ROW (StudentId, Mark)) AS ROW (Studen

Cursor attributes in pl sql, Cursor Attributes   The Cursors and curso...

Cursor Attributes   The Cursors and cursor variables have 4 attributes which give you helpful information about the execution of a data manipulation statement. Syntax:

Theory of catastrophism or catalysm - origin of life, THEO R Y OF CATASTR...

THEO R Y OF CATASTROPHISM OR CATALYSM (CUVIER 1769-1832) - The world has passed thorugh several stages and at the end of each stage there was a catastrophe killing all the

Do you know anyone that can do this type of coding or not?, Task 2 [12 mark...

Task 2 [12 marks] Write the package body for the following package specification (the detailed description of each function and procedure is provided in the appendix below). Place

Scoping-naming conventions, Scoping Within the similar scope, all the de...

Scoping Within the similar scope, all the declared identifiers should be unique. So, even if their datatypes differ, the variables and parameters cannot share the similar name.

Understanding nested tables, Understanding Nested Tables Within the data...

Understanding Nested Tables Within the database, the nested tables can be considered as one-column database tables. The Oracle stores the rows of a nested table in no specific o

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd