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: What's wrong with this SQL?

Re: What's wrong with this SQL?

From: Bent Stigsen <ngcdo_at_thevoid.dk>
Date: Tue, 18 Jan 2005 02:20:15 +0100
Message-ID: <41ec63f8$0$48671$edfadb0f@dread15.news.tele.dk>


ohaya wrote:
[snip]
> Synopsis:

[snip]
> - By eliminating the "CREATE INDEX", that will eliminate an index being
> created, then

That was redundant, as you found out.

Having separate alter-statements for the declarative constraints (I think it is called), is more a matter of style, which people may like or not like for different reasons.

[snip]
>
> Questions:
>
> I'm assuming that when the "ALTER TABLE" makes "sessionid" the primary
> key, that this creates an index. Is this correct?

Yes, defining a primary key implies the creation of an unique index.

> Also, in Oracle, is the constraint "XIE1ss_sessionspec5" that results
> from "ALTER TABLE" treated EXACTLY the same as if it were an INDEX after
> that?

No, there is more to primary keys than that, or rather it is conceptually a different thing.

I am not a dba by profession, so your own dba would probably be better at giving an adequate and accurate explanation for you, but it will probably cost you some kind of bribe.

/Bent Received on Mon Jan 17 2005 - 19:20:15 CST

Original text of this message

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