Re: primary keys and indexes

From: Shaggy D <shaggyd_at_aol.com>
Date: 28 Oct 1994 17:29:04 -0400
Message-ID: <38rqf0$2pi_at_newsbf01.news.aol.com>


In article <38kbb2$r3h_at_newsbf01.news.aol.com>, markp28665_at_aol.com (MarkP28665) writes: (actually (Chua Song Heng) writes)

>If you define an enabled primary key constraint on a table in Oracle7
>then
>Oracle7
>will automatically create a unique index on the constrained columns. By
>default
>this index will go into the same tablespace as the table. I prefer to
>create the
>table, create a unique index in a separate tablespace, and then alter the
>table
>adding a primary key constraint. This gives the DBA group more
>flexibility for
>defraging, reloacating, etc... the table when the need arises.

Just a note ... you can specify the storage of primary key constraints at the time
of table creation by using the following form:

CREATE TABLE xyz
(field_primary NUMBER CONSTRAINT field_primary_p PRIMARY KEY

                        STORAGE clause
                        TABLESPACE clause,
field_2 NUMBER,
...);

Hope this helps.
Eric Dirst
Trident Systems Received on Fri Oct 28 1994 - 22:29:04 CET

Original text of this message