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

Home -> Community -> Usenet -> c.d.o.misc -> Re: [Changing the primary key]Sql proc

Re: [Changing the primary key]Sql proc

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 05 Jul 2007 10:26:43 -0700
Message-ID: <1183656404.233474@bubbleator.drizzle.com>


Oriane wrote:
> Hi there,
>
> I want to add an new column to my tables on a precise database. This
> column (an autoincrement index for instance) will be my primary key
> column. The old one will turn into a unique colum. Of course, there are
> foreign keys in the database...
>
> Is there a "well-known" proc to make the change and migrate the database
> so as to keep the constraints, but to apply them to the new primary keys ?
>
> Regards

Have you, perhaps, mistaken Oracle for being a Microsoft product?

precise database? What does this mean?
autoincrement index? No such entity.
databases in Oracle do not have foreign keys. what you are describing has nothing to do with database migration.

Please state product name and version to 4 decimal places.

In Oracle, BTW, one would do this in a couple of easy steps using DBMS_REDEFINITION. Something that does not exist in whatever product you are using.

-- 
Daniel A. Morgan
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Jul 05 2007 - 12:26:43 CDT

Original text of this message

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