%found - implicit cursor attributes, PL-SQL Programming

%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 one or many rows or a SELECT INTO statement return one or more rows.

Or else, the %FOUND yields FALSE. In the illustration below, you use the %FOUND to insert a row when a delete succeeds:

DELETE FROM emp WHERE empno = my_empno;

IF SQL%FOUND THEN -- delete succeeded

INSERT INTO new_emp VALUES (my_empno, my_ename, ...);

Posted Date: 10/4/2012 4:46:38 AM | Location : United States







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

Write discussion on %found - implicit cursor attributes
Your posts are moderated
Related Questions
Using the FORALL Statement The keyword FORALL instruct the PL/SQL engine to bulk-bind input collections before sending them all to the SQL engine. Though the FORALL statement

IN OUT Mode An IN OUT parameter passes initial values to the subprogram being called and return efficient values to the caller. Within the subprogram, an IN OUT parameter acts

Accessing Attributes: You can refer to an attribute only by its name not by its position in the object type. To access or modify the value of an attribute, you can use the dot

Recursion versus Iteration Dissimilar the iteration, recursion is not crucial to PL/SQL programming. Any problem which can be solved using recursion can be solving using the it

Fetching Across Commits The FOR UPDATE clauses acquire exclusive all row locks. All rows are locked when you open the cursor, and when you commit your transaction they are unl

Transactions in SQL BEGIN TRANSACTION, COMMIT, and ROLLBACK, SQL has the same syntax except for START in place of BEGIN. However, START TRANSACTION is used only for outermost

DELETE Command - SQL Loosely speaking, DELETE removes some existing rows from its target table. Suppose the university decides that course C3 is to be withdrawn. Example shows

FOR-LOOP While the number of iterations through a WHILE loop is unknown till the loop completes, then the number of iterations through a FOR loop is known before the loop is ent

Write a pl/sql block that declares and uses cursors with parameters. In a loop, use a cursor to retrieve the department number and the department name from the departments table

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