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

Home -> Community -> Usenet -> c.d.o.server -> Re: primary key index on separate tablespace not possible?

Re: primary key index on separate tablespace not possible?

From: <ddf_dba_at_my-deja.com>
Date: 2000/06/07
Message-ID: <8hmbm5$hvh$1@nnrp1.deja.com>#1/1

In article <393E84EA.ECF6D77A_at_ougf.fi>,
  Kari Pannila <Xkartsa_at_ougf.fi> wrote:
>
>
> ddf_dba_at_my-deja.com wrote:
>
> > The USING INDEX clause is supported for the alter table command.
 This
> > tells Oracle to utilize the index tablespace provided for the
 primary
> > key index. You need not create the index first and connect it to
 the
> > primary key constraint; the statement above will do all of that for
 you.
>
> Hi
>
> I personally prefer to create the index and the constraint separately,
> because I want the index and the constraint to have same name (for
> instance TABLE01_PK)
>
> I don't like index names (like SYS_C00720 etc..) Oracle gives
> to indexes it creates implicitly for constraints.
>
> regards. Kari
>
> (Mr) Kari Pannila
> Oracle DBA (OCP)
>
> PS. Delete X from my mail address , it (X) is only for SPAMMERS.
> Poista X mail-osoitteen edestä, se on SPAMmereita varten.
>

Kari,

You have missed the point entirely; you can name your constraints with the alter table statement. As an example:

alter table table01
add constraint table01_pk primary key (column1, column2) using index tablespace index01
storage (initial 10m next 10m pctincrease 0);

The constraint is created, named according to your convention and resides in the proper tablespace for indexes, all in one command.

David Fitzjarrell
Oracle DBA

Sent via Deja.com http://www.deja.com/
Before you buy. Received on Wed Jun 07 2000 - 00:00:00 CDT

Original text of this message

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