Just wanted to know the reason why Oracle allows only one PK per table ?
I came across a situation where my existing large PK which is on a single (ID) column needs an alteration to add a new column (No).
ID column on which PK is based is now subjected to have duplication and that is the reason why i want to add a new column. The new column composition is not going to ensure uniqueness.
So, i need to create (alter) PK on two columns now.
It seems, in order to do that, i need to drop the existing PK and create a new one. Since this is a OLTP production database, business cannot afford to drop the existing pk.
When i tried to create a separate PK on two columns, Oracle gave me below err:
ORA-02260: table can have only one primary key
So, i wanted to understand why Oracle allows only one PK / table ? and considering above err, is there any way to make required changes to my PK without altering existing PK?
(Table is a large 30 GB partition table and PK is a non partitioned global index)
I think
PROBABLY i need to drop existing PK and re-create the new one. But core intention for opening this thread is to know rational behind one pk/table concept.