%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
Oracle 11 G new features associated with this release:- Enhanced ILM  - Information Lifecycle Management (ILM) has been around for the almost 10 years, but Oracle has made

Biconditional - SQL The biconditional p ↔ q can be expressed in Tutorial D by p = q and the same is true of SQL. The question then arises as to whether, in SQL, p = q is equiv

%FOUND Until the SQL data manipulation statement is executed, the %FOUND yields NULL. Afterward, the %FOUND yields TRUE, when an INSERT, UPDATE, or DELETE statement affected o

V ariables and Constants in PL/SQL The PL/SQL permits you to declare constants and variables, and then use them in SQL and procedural statements anywhere in the expression. Th

Order of Evaluation When you do not use the parentheses to specify the order of evaluation, the operator precedence determine the order. Now compare the expressions below: NOT

Using DEFAULT You can use the keyword DEFAULT rather than that of the assignment operator to initialize the variables. For e.g. the declaration blood_type CHAR := ’O’; it can b

Parameter Modes   To define the behavior of formal parameters you use the parameter modes. The 3 parameter modes, IN, OUT, & IN OUT, can be used with any subprogram. Though, a

Using a join on 3 tables, select 5 columns and 10 rows from the 3 tables without the use of a Cartesian product Query: SELECT E.LAST_NAME, E.FIRST_NAME, S.BUILDING, S.BRAN

Cursor FOR Loops In most cases that need an explicit cursor, you can simplify the coding by using a cursor FOR loop rather of the OPEN, FETCH, and CLOSE statements. A cursor FO

Bitmap Join Indexes - This feature will increase the performance and detains the size and format of your databases in data Character Semantics and Globalization -This featur