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

Home -> Community -> Usenet -> c.d.o.server -> Re: newbie question

Re: newbie question

From: <sabell_at_escocorp.com>
Date: Fri, 28 May 1999 21:30:55 GMT
Message-ID: <7in1ug$6v7$1@nnrp1.deja.com>


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,
  column3 NUMBER )
    TABLESPACE <table_tablespace>
	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

Original text of this message

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