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

Home -> Community -> Usenet -> c.d.o.server -> Re: PL/SQL statement

Re: PL/SQL statement

From: Niraj Mehta <amrnirj_at_prodigy.net>
Date: Thu, 4 Nov 1999 14:40:33 -0800
Message-ID: <7vs9e3$20no$1@newssvr04-int.news.prodigy.com>


Sure. You could do this by writing a Select statement in your code. This could be something like the following:

SELECT     count(*)
INTO          <variable>
FROM        all_tables

WHERE table_name = '<table_name>'

After this, you could if this variable shows the value of 0 (meaning the table does not exist), go to the create table statement. If it shows 1 (meaning the table exists), go to the end of the code.

This must solve your problem.

<elufker_at_llama.swcp.com> wrote in message news:7vn50u$o3g$1_at_sloth.swcp.com...
> Hi All;
>
>
> Does anyone have any example code that would check to see if a table
> exsists, and if not skip to the create table statement. If the table does
> exsist, then just skip to the end.
>
>
> Thanks in advance for any help here
> Eddie Lufker
>
>
>
Received on Thu Nov 04 1999 - 16:40:33 CST

Original text of this message

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