sql%notfound and NO_DATA_FOUND exceptions.
From: Rashid Karimov <rashid_at_rk.wbs.com>
Date: 1996/11/22
Message-ID: <574nhg$lld_at_nnrp3.farm.idt.net>#1/1
Date: 1996/11/22
Message-ID: <574nhg$lld_at_nnrp3.farm.idt.net>#1/1
In the code like the following:
begin
select id into t_id from widgets
where name = 'X';
if sql%notfound then
null;
end if;
exception
when *****
**********
end;
Does the sql%notfound stmt. I have guarantees
that NO_DATA_FOUND exception will not get propagated into
exception block when and if raises ?
What if I have if sql%found instead of sql%notfound , which
looks like this:
if sql%found then
code1;
else
code2;
end if;
Will the NO_DATA_FOUND exception lead to the execution
of code2 or I'll get an (explicit) exception ?
And the other question I had stands not changed:
in the code like:
select id from t1
where cond1
UNION
select id from t1
where cond2;
if it happens that one of the tables doesn't have any
rows satisfying cond1 or cond2 , would I get NO DATA FOUND ?
E-mail copy of followup , if any , would be appreciated.
--
------------------
Beyond the horizon of the place we lived when we were young
In the world of magnets and miracles
Our thoughts strayed constantly and without boundary
The ringing of the division bell had begun ...
-=PF, The Division Bell=-
Received on Fri Nov 22 1996 - 00:00:00 CET
