Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: PLSQL: how to test if a table exists?

Re: PLSQL: how to test if a table exists?

From: Sybrand Bakker <gooiditweg_at_sybrandb.demon.nl>
Date: Thu, 04 Dec 2003 21:12:04 +0100
Message-ID: <b75vsvkhgqodojbvkifd245daqdqidj1c5@4ax.com>


On Thu, 4 Dec 2003 14:58:58 +0100, "NoName" <nobody_at_nowhere.com> wrote:

>Thanks to everybody.
>Using your suggestions, I produced the following code:
>
>declare
> c numeric;
>begin
> select count(*) into c from user_tables where table_name = 'TABLEXY';
> if c > 0 THEN
> -- statements to do
> end if;
>end;
>
>Hope this could help other newbies :-)
>Regards
>

They would better trust appropiate exception handling and not trust this horrible approach.

--
Sybrand Bakker, Senior Oracle DBA
Received on Thu Dec 04 2003 - 14:12:04 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US