What are cursor attributes?

  • %ROWCOUNT
  • %NOTFOUND
  • %FOUND
  • %ISOPEN

Showing Answers 1 - 9 of 9 Answers

syam sundar

  • Aug 17th, 2007
 

%ROWTYPE - returns number of the rows which are fetched/updated/deleted
%ISOPEN    - returns true if the cursor is open
%FOUND     - returns true if the cursor fetched any row
%NOTFOUND-returns true if the cursor does not fetch any row

narmadac

  • Feb 11th, 2010
 

Cursor attributes when appended to the cursor name allow the users to access useful information from the retrieved rows.  After opening a cursor a 'fetch' statement is used to fetch rows from the active set, one at a time.  The following attributes indicate whether fetch statement has failed or succeeded.

  • %NOTFOUND  -  evaluates true when no records are found or when 'fetch' fails to return a row.
  • %FOUND - evalutes true when records are found or when 'fetch' succeeds in returing rows.
  • %ROWCOUNT - to return number of rows fetched or when 'fetch' returns the number is incremented.
  • %ISOPEN - evaluates true when cursor is open else false.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions