Message ORA-02261: such unique or primary key already exists in the table |
Cause of Error This behavior occurs when you try to define both unique and primary key constraints on a column of the table. When you define a primary key constraint for a column, you specify that the data in that column must be unique; therefore, defining another unique constraint in addition to the primary key constraint is redundant. |
Solution Summary To resolve this problem, drop either the unique constraint or the primary key constraint, as appropriate, from the table in Oracle Schema Manager. |
Solution Details 1) If you have not done so, locate and then click the table that contains the constraint you want to drop. The definition of the selected table appears in the right pane. 2) Click the 'Constraints' tab, and then click the button to the left of the 'Name' box to select the constraint you want to delete. 3) Right-click the constraint, and then click 'Drop' to delete only the constraint or 'Drop with Cascade' to delete the constraint as well as any associated foreign key constraints. 4) Click 'Apply'. |
Applies to Software Version Oracle8 Schema Manager |
