%found - explicit cursor attributes, PL-SQL Programming

%FOUND

Subsequent to a cursor or cursor variable is opened but before the first fetch, the %FOUND yields NULL. Afterward, it yields TRUE when the last fetch returned a row, or FALSE when the final fetch failed to return a row. In the illustration below, you use %FOUND to select an action:

LOOP

FETCH c1 INTO my_ename, my_sal, my_hiredate;

IF c1%FOUND THEN -- fetch succeeded

...

ELSE -- fetch failed, so exit loop

EXIT;

END IF;

END LOOP;

When the cursor or cursor variable is not open, referencing it with the %FOUND raises the predefined exception INVALID_CURSOR.

Posted Date: 10/4/2012 4:09:48 AM | Location : United States







Related Discussions:- %found - explicit cursor attributes, Assignment Help, Ask Question on %found - explicit cursor attributes, Get Answer, Expert's Help, %found - explicit cursor attributes Discussions

Write discussion on %found - explicit cursor attributes
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

Data Types in SQL - Interval, Boolean INTERVAL for values denoting, not intervals (!) but durations in time, such as 5 years, 3 days, 2 minutes, and so on. BOOLEAN, con

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

Example of Cast Operator So long as CAST is used as shown, we could obtain the total marks for each exam in similar fashion, using SUM (Mark) AS TotalMarks. However, this giv

Synonyms You can create the synonyms to provide location transparency for the remote schema objects like tables, views, sequences, stand-alone subprograms, and packages. Though,

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

Relational Operators The relational operators permit you to compare randomly complex expressions. The list below provides the meaning of each operator:

Transaction context As the figure shows, the major transaction shares its context with the nested transactions, but not with the autonomous transactions. Similarly, If one aut

Product-specific Packages The Oracle and different Oracle tools are supplied with the product-specific packages which help you to build the PL/SQL-based applications. For illu

How Transactions Guard Your Database The transaction is a sequence of SQL data manipulation statements which does a logical unit of work. The Oracle treats the sequence of SQL