Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: [Changing the primary key]Sql proc
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.orgReceived on Thu Jul 05 2007 - 12:26:43 CDT