Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: null select
Either use exceptions which it sounds like you don't want to use or
if all that you care about is yes it exists or no it doesn't exist then
use:
select count(*)
into cnt
from tableA
where ...blah.
Mr. News wrote:
>
> hi
>
> i am having some problems with my select into
> statement.
>
> i'm trying to see if an item is in a table. but
> oracle complains when nothing returns from
> the query.
>
> is there a way around this? i.e. how do i tell
> if something is in the table or not?
>
> here's a bit of code:
>
> select rpt_id
> into myvar
> from tableA
> where ...blah..
>
> thanks.
Received on Thu Aug 28 1997 - 00:00:00 CDT
![]() |
![]() |