What is the difference between NO DATA FOUND and %NOTFOUND ?

Showing Answers 1 - 22 of 22 Answers

Sheetal

  • Aug 24th, 2006
 

NO_DATA_FOUND is system defined exception. This is generated when no rows selected.

%NOTFOUND is attribute which is used with cursor. If cursor returns no row then %NOTFOUND returns true and if returns row then %NOTFOUND is false.

  Was this answer useful?  Yes

Madhuri

  • Feb 7th, 2007
 

NO_DATA_FOUND is raised when select statement of pl/sql block does not return any rows.%NOTFOUND is raised when select statement of cursor does not return any rows.

  Was this answer useful?  Yes

BASAVARAJ KOLUR

  • Mar 8th, 2007
 

i think maduri ans is wrong..

  no_data_found is oracle predefined exception it raises when select stament no able to fetch row from table then no_data_found exception raises


%notfound is cursor attribute. in case of update and delete statement when rows not matched for updation and delete then that time cursor%not found attribute becomes true otherwise it become false

when no_data_found arises controll immeditily goes to exception section but in case of %notfound controll not goes to exception section

  Was this answer useful?  Yes

Mohan

  • Apr 7th, 2007
 

NO_DATA_FOUND is an oracle predefined expection. We can use it whenever the sql statements don't return any rows within the pl/sql block.


%NOTFOUND is an attribute returns boolean for both explicit and implicit cursors, this can be used when the recent sql statements don't affect any rows i.e., even if we have given insert or update or delete or pl/sql select within the block, it doesn't affect any single row means the cursor cannot be found...

  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