%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
Variable Declaration - SQL SQL's support for variables is very similar to Tutorial D's, except that the syntax for creating persistent  variables-base tables-is quite differen

Find the account numbers of all customers whose balance is more than 10,000 $

Tables within a Table - SQL Figure here is an exact copy of the one in the theory book and as before it is just an alternative way of representing some of the information con

DECLARE : This keyword signals the beginning of the declarative section of the PL/SQL block, that contains local declarations. The Items declared locally exist only within the

Count Operator in SQL Example: Counting the students who have scored more than 50 in some exam (SELECT COUNT (*) FROM (SELECT DISTINCT StudentId FROM EXAM_MARK WHE

Row Operators The Row operators return or reference the particular rows. ALL retains the duplicate rows in the result of a query or in an aggregate expression. The DISTINCT el

ROWNUM The ROWNUM returns a number representing the order in which a row was selected from the table. The first row selected has a ROWNUM of 1; the second row has a ROWNUM of

IN Mode An IN parameter pass the values to the subprogram being called. Within the subprogram, an IN parameter acts like a constant. And hence, it cannot be assigned a value.

Updating by replacement Syntax: UPDATE ENROLMENT SET Name = 'Ann' WHERE StudentId = SID ('S1'); Note the use of SET, as already noted in connection with direct a

BETWEEN Operator The operator BETWEEN, tests whether the value lies in a specified series. That means "greater than or equivalent to low value and less than or equivalent to hig