SQL CODE -625 while creating primary key

2 posts / 0 new
Last post
Anonymous
SQL CODE -625 while creating primary key

 

 

 

 

 

SQL CODE -625 while creating primary key

 

I was trying to create a new primary key on a table by dropping the existing primary key.  I got the sql code of  -625, when I tried to create the new primary key and the error message read as

SQLCODE = -625, ERROR:  TABLE Tablename DOES NOT HAVE AN INDEX TO ENFORCE THE UNIQUENESS OF THE PRIMARY OR UNIQUE KEY

Do I need to define a Unique index on the table for the new primary key ?

"; ; ; ;
Anonymous
SQL CODE -625 while creating primary key

  Yes, that is true.  Create an index on the Column you want as the new Primary Key and then define that column as the Primary Key.  If it is the Primary key, then there should be No Duplicate values in the that column.

  Hope this helps.

Jerry

Log in or register to post comments
Sponsored Listing