Re: Primary Key
Date: 1999/04/11
Message-ID: <37109EB4.8DD03AD6_at_india.hp.com>#1/1
The problem in your case the table my_table has duplicate rows. That is
the reason
you are not able to add the primary key constraint. Either Delete the
duplicate rows or truncate the table itself.
Then try to add the constraint.
You can verify the addition of constraint by querying the
all_constraints table for that table name my_table.
regards
vittal
Genna wrote:
> I created a table using
>
> create table my_table
> as select x, y , y
> from d
>
> when I alter the constranint
>
> SQL> alter table my_table
> 2 add (constraint my_table_pk primary key (x));
> alter table my_table
> *
> ERROR at line 1:
> ORA-02437: cannot enable (ORGANIZATION.MY_TABLE_PK) - primary key
> violated
>
> anyone know how to alter the primary key without without getting a
> violation??
Received on Sun Apr 11 1999 - 00:00:00 CEST