Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Sql proc
On Jul 5, 3:36 pm, "Oriane" <ori..._at_guermantes.fr> 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
The well known proc is you use ALTER table ... drop constraint and ALTER table ... ADD constraint statements to DIY (Do it yourself). As the PK changes, no other solution.
-- Sybrand Bakker Senior Oracle DBAReceived on Thu Jul 05 2007 - 10:47:37 CDT
![]() |
![]() |