Difference between NO DATA FOUND and %NOTFOUND

NO DATA FOUND is an exception raised only for the SELECT....INTO statements when the where clause of the querydoes not match any rows. When the where clause of the explicit cursor does not match any rows the %NOTFOUND attribute is set to TRUE instead.

Showing Answers 1 - 7 of 7 Answers

Ayan Mahalanabish

  • Jul 12th, 2006
 

NO DATA FOUND is an Exception whereas %NOTFOUND is a cursor attribute

  Was this answer useful?  Yes

syam sundar

  • Aug 17th, 2007
 

NO DATA FOUND is an exception

When your SELECT INTO statement returns no rows that time an error raised by oracle. The error is ORA-01403 NO DATA FOUND

Whereas %NOTFOUND is a cursor attribute

It returns true if the cursor does not fetch any row. It checks wether the cursor returns the rows or not. 

g_sidhu

  • Feb 6th, 2008
 

NO DATA FOUND: Is an exception which is raised when no rows are retrieved from the database in a SELECT statement, then PL/SQL raises the exception NO_DATA_FOUND.

%NOTFOUND: is a Boolean attribute that evaluates to TRUE if the most recent SQL

statement does not affect any rows.

  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