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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Primary key

Re: Primary key

From: Pei L. Ku <pku_at_gte.net>
Date: 1999/04/10
Message-ID: <7eo1mb$gqd$1@news-2.news.gte.net>#1/1

tyann001_at_aol.com wrote in message <370CB115.350A8F9_at_aol.com>...
>Anyone know how to add a primary key to a column on an existing table?

  1. CREATE UNIQUE INDEX on the column(s) to be used as PK.
  2. ALTER TABLE <tbl> ADD PRIMARY KEY USING INDEX (exact syntax may differ slightly -- refer to your SQL Ref manual).

Pei
DBA Consultant. Received on Sat Apr 10 1999 - 00:00:00 CDT

Original text of this message

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