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: Creating Table as select...

Re: Creating Table as select...

From: Richard Foote <richard.foote_at_bigpond.com>
Date: Tue, 10 Feb 2004 12:29:06 GMT
Message-ID: <m84Wb.50646$Wa.38788@news-server.bigpond.net.au>


"Daniel Morgan" <damorgan_at_x.washington.edu> wrote in message news:1076372192.932013_at_yasure...
> As Jonathan points out your can and the syntax is documented both by
> Jonathan and at http://tahiti.oracle.com. That said I would like to
> discourage you from doing so.
>
> The reason is that schema objects change. And when people write a single
> create table statement with primary key, unique constraints, foreign key
> constraints, and check constraints they get something that is not
> maintainable. It is always better to CREATE TABLE and then user ALTER
> TABLE to implement the constraints. Keep in mind there is more you want
> to do than just specify the USING INDEX clause ... you may want
> DEFERABLE or other options. And why drop the table just to change a
> constraint.

Hi Daniel,

Please forgive me as it's getting a little late so I'm possibly missing something really obvious here, but why precisely do you need to drop a table to just change a constraint if you created both the table, constraints and indexes in the one statement ? And also why can't you use deferrable and other options at the same time ?

BTW, I'm currently drinking a blended whiskey, not single malt I know but at least there's no diet coke ;)

Cheers

Richard Received on Tue Feb 10 2004 - 06:29:06 CST

Original text of this message

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