Pages: 2
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
these include rowtype matching rules

These include rowtype matching rules

FETCH building_curvar
INTO home_rec;

/* If I got here, the site was a home, so display it. */ show_home_site (home_rec);
/* If the first record was not a home... */
/* Fetch that same 1st row into the commercial record. */ FETCH building_curvar
INTO commercial_rec;

• An OPEN statement FOR that query was executed with the cursor variable.• A cursor variable was assigned a value from another cursor variable that refers to that query.

You can perform assignment operations with cursor variables and also pass these vari‐ables as arguments to procedures and functions. To make it possible to perform such actions between cursor variables (and to bind a cursor variable to a parameter), the different cursor variables must follow a set of compile-time and runtime rowtype matching rules.

Cursor Variables and REF CURSORs | 527

— One variable (or parameter) is of any strong REF CURSOR type, and the other is of any weak REF CURSOR type.

• A cursor variable (or parameter) of a strong REF CURSOR type may be OPEN FOR a query that returns a rowtype that is structurally equal to the rowtype_name in the original type declaration.

• A cursor variable (or parameter) of a weak REF CURSOR type may be made to refer to a query of any rowtype, regardless of the query or cursor object to which it may have referred earlier.

• A cursor variable (or parameter) of a strong REF CURSOR type may be made to refer only to a query that matches structurally the rowtype_name of the RETURN clause of the REF CURSOR type declaration.

Cursor variable aliases

If you assign one cursor variable to another cursor variable, they become aliases for the same cursor object; i.e., they share the reference to the cursor object (the result set of

528 |

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File

Uploaded by : Nirvi Gala