Re: Modify Primary Key

  • From: Yechiel Adar <adar76@xxxxxxxxxxxx>
  • Date: Sun, 16 Oct 2005 15:42:43 +0200

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@xxxxxxxxxxxxx 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
--
//www.freelists.org/webpage/oracle-l




-- //www.freelists.org/webpage/oracle-l

Other related posts: