need to create pk index in seprate tablespace [message #64212] |
Mon, 03 January 2005 21:58 |
puneet
Messages: 76 Registered: August 2002
|
Member |
|
|
Is it possible to define separate tablespace for PK Indexs ...? normally PK index gets created automatically along with the PK constraint ....but if i want to store PKs Indexes in a separate tablespace .... then how do I mention that ....?
|
|
|
Re: need to create pk index in seprate tablespace [message #64214 is a reply to message #64212] |
Mon, 03 January 2005 23:55 |
Frank
Messages: 7901 Registered: March 2000
|
Senior Member |
|
|
First create the index, then create the primary key 'using index <<z>index_name>':
ONTW>create table tst(id int);
Table created.
ONTW>create index tst_i on tst(id);
Index created.
ONTW>alter table tst add constraint tst_pk primary key (id) using index tst_i;
Table altered.
hth
|
|
|
Re: need to create pk index in seprate tablespace [message #64215 is a reply to message #64214] |
Mon, 03 January 2005 23:59 |
puneet
Messages: 76 Registered: August 2002
|
Member |
|
|
hi,
Got the answer
CREATE TABLE puneet_sal
( salary NUMBER CONSTRAINT pk_sal
PRIMARY KEY
USING INDEX TABLESPACE users_a,
losal NUMBER,
hisal NUMBER ) TABLESPACE human_resource;
See in this puneet_sal is created in human resource table and pl_index in user_a table space Oracle creates to enforce this constraint is created in the USERS_A tablespace.
Can u tell me
CREATE TABLE emp_tmp
NOLOGGING
PARALLEL (DEGREE 3)
AS SELECT * FROM emp WHERE deptno = 10;
What is nologging and parallel (degree 3)
Cheers
Puneet Sachar
|
|
|