Oracle partitioning scenario with primary key absolutely required

oraclepartitioningprimary-key

Is there any partitioning scenario in which the partitioned table is absolutely required to have primary key?

Best Answer

Yes, reference partitioning requires a primary key on the parent table.

Reference partitioning enables the partitioning of two tables that are related to one another by referential constraints.

The partitioning key is resolved through an existing parent-child relationship, enforced by enabled and active primary key and foreign key constraints.

If you try to do this with a unique key instead of a primary key, you will get this error:

ORA-02268: referenced table does not have a primary key