Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Basic: Index on Primary Key
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