Re: primary key indexes - where ???

From: Chuck Hamilton <chuckh_at_dvol.com>
Date: 1996/09/23
Message-ID: <32468c78.1870800_at_n5.gbso.net>#1/1


seci_at_ludens.elte.hu wrote:

>hello,
>
>if i have a table with a primary key it is obvious that oracle will
>create an index (of course a unique one) to maintain this constraint
>(but if i look at user_indexes i cannot see this index).
>
>is it possible to define the name and the TABLESPACE and STORAGE of this
>kind of indexes or not?
>
>TIA
> peter

Peter,

yes, you can. If you give the PK constraint a name, it will use the constraint name for the index. You can also include a USING INDEX clause to specify storage parameters for the resulting index. Otherwise it'll use default values (default tablespace, default sizing, etc.)

Example:

ALTER TABLE mytable
ADD CONSTRAINT mytable_pk PRIMARY KEY (col1, col2, ...) USING INDEX
TABLESPACE index_ts STORAGE (INITIAL 10m NEXT 2m PCTINCREASE 0) PCTFREE 10
/

--
Chuck Hamilton
chuckh_at_dvol.com

This message delivered by electronic sled dogs. WOOF!
Received on Mon Sep 23 1996 - 00:00:00 CEST

Original text of this message