Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Basic: Index on Primary Key

Re: Basic: Index on Primary Key

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: 29 Mar 2002 06:30:57 -0800
Message-ID: <a20d28ee.0203290630.5e2d7667@posting.google.com>


Praveen <pmohanan_at_directvinternet.com> wrote in message news:<3CA416A5.A9311DFB_at_directvinternet.com>...
> Hi..All,
>
> This might be a basic question. As far as I have learned, we should
> first create an Index(es) on the column(s) identified as primary key of
> a table. Then alter the table to create the primary key, so that the Key
> automatically uses the index instead of creating its own index in the
> system tablespace. How much of this is true?
>
> TIA
when creating a primary key constraint you can specify the tablespace of the index and the storage clause with the using index clause

alter table foo add constraint foo_pk primary key(empno) using index tablespace bar storage(initial 10k next 10k pctincrease 0)

No need to do this with 2 commands.

Regards

Sybrand Bakker
Senior Oracle DBA Received on Fri Mar 29 2002 - 08:30:57 CST

Original text of this message

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