Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: primary key index on separate tablespace not possible?
Richard,
Look at complete create table syntax. You can add a clause
....USING INDEX .....
which specify all the storage options for the index supporting the
constraints (PK and unique).
Example from OTN
CREATE TABLE dept
(deptno NUMBER(2),
dname VARCHAR2(9), loc VARCHAR2(10), CONSTRAINT unq_dname UNIQUE (dname) USING INDEX PCTFREE 20 TABLESPACE user_x STORAGE (INITIAL 8K NEXT 6K) );
-- I hope this helps Eugenio Opinions are mine and do not necessarily reflect those of my company Richard Chen wrote in message <393E3BE3.D1B9F07A_at_snet.net>...Received on Wed Jun 07 2000 - 00:00:00 CDT
>We generally have tables and indexes on separate tablespaces.
>However, I find that the following does not work:
>
>alter table t_name add constraint t_name_pk primary key (column_name)
>tablespace ts_name;
>
>Without using "tablespace ts_name" the above works except that
>the index is created on the same tablespace as for the table itself.
>
>Can anyone confirm that this is true or my syntax is wrong.
>
>Thanks
>
>Richard