GeekInterview.com
Series: Subject: Topic:
Question: 160 of 191

What are cursor attributes?

  • %ROWCOUNT
  • %NOTFOUND
  • %FOUND
  • %ISOPEN
Asked by: Interview Candidate | Asked on: Aug 29th, 2004
Showing Answers 1 - 3 of 3 Answers

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

Yes  1 User has rated as useful.
  
Login to rate this answer.
syam sundar

Answered On : 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

Yes  2 Users have rated as useful.
  
Login to rate this answer.
narmadac

Answered On : Feb 11th, 2010

View all answers by narmadac

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.

  
Login to rate this answer.

Give your answer:

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

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.