Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What's wrong with this SQL?
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