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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: local partitioned primary key

Re: local partitioned primary key

From: Igor Neyman <ineyman_at_perceptron.com>
Date: Fri, 5 May 2000 11:48:34 -0400
Message-Id: <10488.105069@fatcity.com>


Try this:

create table test_NAMES
(

    test_name                VARCHAR2(30)           not null,
    test_type                SMALLINT               not null,
    constraint PK_test_NAMES primary key (test_name)
        using index

 local
)
partition by range (test_name)
(partition n1 values less than ('C')
storage(initial 10K next 10K minextents 1 pctincrease 0) tablespace DDMUSR,
partition n2 values less than ('F')
storage(initial 10K next 10K minextents 1 pctincrease 0) tablespace DDMUSR,
partition n3 values less than ('O')
storage(initial 10K next 10K minextents 1 pctincrease 0) tablespace DDMUSR)
/

or this:

create table test_NAMES
(

    test_name                VARCHAR2(30)           not null,
    test_date                DATE               not null,
    constraint PK_test_NAMES primary key (test_name, test_date)
        using index local

)
partition by range (test_date)
(partition n1 values less than (TO_CHAR(LAST_DAY(SYSDATE))) storage(initial 10K next 10K minextents 1 pctincrease 0) tablespace DDMUSR,
partition n2 values less than (TO_CHAR(ADD_MONTH(LAST_DAY(SYSDATE)))) storage(initial 10K next 10K minextents 1 pctincrease 0) tablespace DDMUSR)
/

HTH Igor Neyman, OCP DBA
Perceptron, Inc.
(734)414-4627
ineyman_at_perceptron.com

> I'm trying to learn more about partitioned indexes.
> As part of this learning effort, I'm trying to
> create local partition index that also happens
> to be the primary key on the table.
>
> Is it possible to create a local partition primary key?
>
> I can't seem to compose any acceptable SQL syntax using the ALTER TABLE
command.
>
> I'd like to see any working SQL example & hopefully from the example I can
> modify it to work for me here.
>
> TIA!
>
> --
> Charlie Mengler Maintenance Warehouse
> charliem_at_mwh.com 5505 Morehouse Drive
> 858-552-6229 San Diego, CA 92121
> If you don't use vi, then you shouldn't be working on UNIX!
> --
> Author: Charlie Mengler
> INET: charliem_at_mwh.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
Received on Fri May 05 2000 - 10:48:34 CDT

Original text of this message

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