Re: Primary key
Posted in 2003
Sure. Drop any foreign key constraints referencing the primary key that will need to reference the new key once established, drop the primary key, drop the primary key index if not needed or if that column will no longer be unique, alter the table to include the new column, populate the new column, alter the new column to NOT NULL if appropriate, create the new UNIQUE index on the new primary key, alter the table to add the new PRIMARY KEY constraint, restore the referencing FOREIGN KEY constraints. Add a non-unique index on the original foreign key if needed for searching efficiency. Art S. Kagel ----- Original Message ----- From: Hamid Habzi <HHABZI@bmcebank.co.ma> At: 3/ 3 11:39 > Hi, > Is it possible to add a column to the primary key whithout unloading, > droping, Re-creating then loading the table?. > Tanks for helping. > Regards.