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: Partitioned Primary Key - Oracle 8i

Re: Partitioned Primary Key - Oracle 8i

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: 2000/08/09
Message-ID: <399141C7.1FB6@yahoo.com>#1/1

rspeaker_at_my-deja.com wrote:
>
> hi,
>
> is it possible to create a partitioned primary key on a table?
> I have tried this using the normal PK syntax but it fails.
>
> I have created a table using hash partitions on an ID field.
> This same field will be included in the PK, along with a timestamp.
> I want to partition the PK as well.
>
> I tried using
>
> alter table <TABLENAME>
> add constraint (CONSTRAINT_NAME)
> primary key (timestamp,id)
> using index tablespace (ts1,ts2,ts3,ts4)
> storage (initial blah blah blah);
>
> it fails, gives me a message that says
>
> ERROR at line 4:
> ORA-02216: tablespace name expected
>
> is there a syntactical difference to creating a partitioned PK?
>
> I'm using Oracle 8.1.6 on AIX 4.3.3
>
> Thanks,
> Roy
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.

If you want multiple tablespaces, you need to specify each partition separately...

Alternatively create the index first and then add the primary key on top of that..

HTH

-- 
===========================================
Connor McDonald
http://www.oracledba.co.uk

We are born naked, wet and hungry...then things get worse
Received on Wed Aug 09 2000 - 00:00:00 CDT

Original text of this message

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