%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
UNION and OR - SQL SQL supports UNION explicitly but differently from the way it supports JOIN explicitly. As we have seen, JOIN is used exclusively within the FROM clause, su

Recursion The Recursion is a powerful method for simplify the design of the algorithms. Principally, the recursion means the self-reference. In the recursive mathematical serie

Using a Host Variable You can declare the cursor variable in the PL/SQL host environment like an OCI or Pro C program. To use the cursor variable, you should pass it as a host

How Exceptions Propagate ? Whenever an exception is raised, and if the PL/SQL cannot find a handler for it in the present subprogram or block, the exception propagates. That is

ORIGIN OF EARTH - BIG-BAN G HYPOTHESIS - Origin of life is linked to origin of earth. Cosmos, the Universe originated 10-20 billion years ago by Big Bang (thermonu

Consider the following set of database tables (same tables from Assignment 6-1). Please take note of foreign keys (most of them carry the same names as the corresponding primary ke

Develop Data Business Intelligence Project Project Description: We are linking our Microsoft SQL Database to GoodData Business Intelligence. We are seeking somebody who has e

How do I display usernames for students from a student table, assigning each student a username initials001 (initials is the actual student initials), and if the students initials

Data Types in SQL - Character CHARACTER or, synonymously, CHAR, for character strings. When this type is to be the declared type of something (e.g., a column), the permissible

Implicit Cursors The Oracle implicitly opens a cursor to process each SQL statement not related with an explicitly declared cursor. The PL/SQL lets you refer to the most recen