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: Create a table only if the table doesn't exists

Re: Create a table only if the table doesn't exists

From: fred <r5tr_at_free.fr>
Date: Fri, 23 Jun 2006 11:06:43 +0200
Message-ID: <e7gav8$1og$1@s1.news.oleane.net>


"Mark D Powell" <Mark.Powell_at_eds.com> a écrit dans le message de news: 1151005831.800279.287370_at_y41g2000cwy.googlegroups.com...
> In your pl/sql routine you can select againt all_tables or dba_tables
> to see if the table exists. A select count(*) always returns a value
> so zero would indicate the table does not exist and to run the create
> table logic while > 0 would tell that the table already exists.

Following your advice, I have written it like this (I prefer to look into user_tables to avoid to see others schemas tables):

DECLARE
tableExists number;
BEGIN

Thanks for your help.
Fred. Received on Fri Jun 23 2006 - 04:06:43 CDT

Original text of this message

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