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: Naming Primary Key

Re: Naming Primary Key

From: Nicolas Bronke <NBronke_at_TRINITY.de>
Date: Wed, 3 Mar 1999 21:53:50 +0100
Message-ID: <36dda097@news.uk.ibm.net>

Stan schrieb in Nachricht <36DD9E3D.8C474C5_at_yahoo.com>...
>Is there a way that you can assign a name to the primary key the same
>way you can an index?
>
>If I do:
>alter table person add primary key(ssn);
>create index lastname on person(lname);
>select index_name from user_indexes;

Use instead

ALTER TABLE PERSON
  ADD CONSTRAINT PERSON_PK PRIMARY KEY (SSN)

                                    using index TABLESPACE INDEX;

PERSON_PK or any what you like to have.

Kind regards
Nicolas Bronke Received on Wed Mar 03 1999 - 14:53:50 CST

Original text of this message

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