Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: newbie question
In article <7imo7k$vkd$1_at_nnrp1.deja.com>,
nramana_at_my-deja.com wrote:
>
>
> hi,
>
> if u define a column as a primary key in a
> table, oracle implicitly creates an index
> for that column. is it possible to force
> oracle to use a tablespace (other than the
> default) for storing this index ?
> if so, how is it done ?
Try this:
CREATE TABLE <your-tablename-here>
( column1 NUMBER CONSTRAINT pk_column1
PRIMARY KEY USING INDEX TABLESPACE <index_tablespace_name>,column2 NUMBER,
STORAGE (INITIAL 4000 NEXT 4000 MINEXTENTS 1 MAXEXTENTS 5 PCTINCREASE 5);
You can use the ALTER TABLE command to add a primary key constraint( assuming that a primary key constraint doesn't already exist ) with the same index storage syntax.
>
> --ramana
>
> Sent via Deja.com http://www.deja.com/
> Share what you know. Learn what you don't.
>
Good luck,
Scott
Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't.
Received on Fri May 28 1999 - 16:30:55 CDT
![]() |
![]() |