| |
GeekInterview.com > Interview Questions > Oracle > PL/SQL
| Print | |
Question: In PL/SQL if we write select statement with INTO clause it may return two exceptions NO_DATA_FOUND or TOO_MANY_ROW . To do you avoid these execeptions. How do you write SQL statement in alternative way?
|
| May 05, 2008 06:54:43 |
#5 |
| krishnaindia2007 |
Member Since: September 2007 Total Comments: 116 |
RE: In PL/SQL if we write select statement with INTO clause it may return two exceptions NO_DATA_FOUND or TOO_MANY_ROW . To do you avoid these execeptions. How do you write SQL statement in alternative way? |
You may avoid too_many_rows exception using CURSORS.
In cursors if NO_DATA_FOUND then it will not raise any exception. In cursors you need to handle it using %FOUND or %NOTFOUND cursor attributes.
|
| |
Back To Question | |