This content has been marked as final. Show 4 replies
If a PK already exists, & is by definition unique, why is another column required?
Is the additional column already part of the existing table or does this "new" column need to be added to the table, too?
I don't know the answer to the first question but the second, yes the column that needs to be added already exists in the table.
One way to do it is:
1) Create a unique index with the new primary-key columns.
2) Disable and Drop the primary-key constraint
3) Add the new primary-key constraint using index (just created in step 1).
You may want to read the fine Oracle® Database [SQL Reference|http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_3001.htm#i2103997] manual to get the syntax.
I was hoping it could be done without dropping the current primary key but if this the way to do it, so be it.