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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Modify Primary Key

Re: Modify Primary Key

From: Yechiel Adar <adar76_at_inter.net.il>
Date: Sun, 16 Oct 2005 15:42:43 +0200
Message-ID: <435258D3.9040001@inter.net.il>


Assuming that you have n columns in the PK and the first n-1 columns are enough for PK.

  1. Why not leave this as it is?
  2. If you do not want to change everything at once you can create a unique index on the first n-1 columns and start to move the constraints to this index. When all is done just drop the PK constraint and you are done. All the fields should be already not null and the unique index on top of this gives you a PK.

Adar Yechiel
Rechovot, Israel

manoj.gurnani_at_polaris.co.in wrote:

>
>
>
>Hi,
> What are different steps to be followed in modifying a primary
>key(PK1) to exclude last primary key column from a list of primary key
>columns.
>assuming referential integrity constraints exists on primary key in diff
>tables.
>give necesary sql syntax to perform the tasks .
>
>Thanks
>Manoj
>
>
>This e-Mail may contain proprietary and confidential information and is sent for the intended recipient(s) only.
>If by an addressing or transmission error this mail has been misdirected to you, you are requested to delete this mail immediately.
>You are also hereby notified that any use, any form of reproduction, dissemination, copying, disclosure, modification,
>distribution and/or publication of this e-mail message, contents or its attachment other than by its intended recipient/s is strictly prohibited.
>
>Visit Us at http://www.polaris.co.in
>--
>http://www.freelists.org/webpage/oracle-l
>
>
>

--
http://www.freelists.org/webpage/oracle-l
Received on Sun Oct 16 2005 - 07:45:12 CDT

Original text of this message

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