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 -> How to conditionally copy and then create it using SQL scripts

How to conditionally copy and then create it using SQL scripts

From: zl <lzhang_at_bj.bexcom.com>
Date: 10 Oct 2001 01:42:09 -0700
Message-ID: <de83f985.0110100042.43dac84f@posting.google.com>


In SQL server, the following SQL statements can be used to create a table if it is not existed.

IF EXISTS (SELECT * FROM sysobjects

                               WHERE name = 'BusinessDocIdGenerator' 
                                       AND type = 'U')
           DROP TABLE BusinessDocIdGenerator

CREATE TABLE BusinessDocIdGenerator (
       NumericGeneratorId   int NULL,
       .....

)

How can I do this in Oracle? Oracle doens't allow "if" appears in sqlplus. Received on Wed Oct 10 2001 - 03:42:09 CDT

Original text of this message

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