GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  SQL

 Print  |  
Question:  Difference between NO DATA FOUND and %NOTFOUND


Answer:
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.


February 02, 2008 14:56:46 #3
 g_sidhu   Member Since: August 2007    Total Comments: 122 

RE: Difference between NO DATA FOUND and %NOTFOUND
 

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.

     

 

Back To Question