Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: whenever sqlerror is an unknown statement?
<jjsavage_at_gmail.com> wrote in message
news:1138039070.230535.199500_at_f14g2000cwb.googlegroups.com...
> >BTW: In Oracle one doesn't check the dictionary for existence or
>>non-existence of tables. One traps exceptions.
>
> Which exception do I trap? I've found several lists of exceptions
> thrown, but none of them are the right one.
>
> - John
>
SQL> select *
2 from thistableisnothere;
from thistableisnothere
*
ERROR at line 2:
ORA-00942: table or view does not exist
use WHEN OTHERS and check SQLCODE for -942
(and a picky point: exceptions are raised, not thrown)
++ mcs Received on Mon Jan 23 2006 - 19:33:13 CST
![]() |
![]() |