%rowcount, PL-SQL Programming

%ROWCOUNT

When its cursor or cursor variable is opened, the %ROWCOUNT is zeroed. Before the first fetch, the %ROWCOUNT yields 0. Afterward, it yields the number of rows fetched so far. The number is incremented if the final fetch returned a row. In the next illustration, you can use the %ROWCOUNT to take action if more than ten rows have been fetched:

LOOP

FETCH c1 INTO my_ename, my_deptno;

IF c1%ROWCOUNT > 10 THEN

...

END IF;

...

END LOOP;

When a cursor or cursor variable is not open, referencing it with the %ROWCOUNT raises the

INVALID_CURSOR.

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







Related Discussions:- %rowcount, Assignment Help, Ask Question on %rowcount, Get Answer, Expert's Help, %rowcount Discussions

Write discussion on %rowcount
Your posts are moderated
Related Questions
#quesWrite a cursor to open an employee database and fetch the employee record whose age is greater than 45.tion..

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

Exceptions An exception is the runtime error or warning condition that can be predefined or user-defined. The Predefined exceptions are raised implicitly through runtime system

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

UNNEST operator in SQL The inverse operator of GROUP is UNGROUP. SQL has an operator, UNNEST, that can be used for similar purposes, but its method of invocation is somewhat p

3CX PBX sync Windows Service Project Description: !! You require access to a commercial version of the 3CX PBX system in order to be able to program the API !! !! You requ

Adding Table Constraints ALTER TABLE ENROLMENT ADD CONSTRAINT NameNotNull CHECK (Name IS NOT NULL) ; ALTER TABLE ENROLMENT ADD CONSTRAINT PK_StudentId_CourseId PRIM

LAWS / RULES - Dollo's Law                     :           Living organisms do exhibit evolutionary irreversibility or evolution is irreversible. Williston's Law

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

Using FORALL and BULK COLLECT Together You can unite the BULK COLLECT clause with the FORALL statement, in that case, the SQL engine bulk-binds column values incrementally. In