| |
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. |
| August 08, 2007 08:57:03 |
#2 |
| syam sundar |
Member Since: Visitor Total Comments: N/A |
RE: Difference between NO DATA FOUND and %NOTFOUND |
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. |
| |
Back To Question | |