Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: Partitioned Primary Key - Oracle 8i
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 worseReceived on Wed Aug 09 2000 - 00:00:00 CDT