Skip to Content
Custom Search

SQL CODE -625 while creating primary key

1 reply [Last post]
Anonymous

 

 

 

 

 

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 ?

"; ; ; ;
Sponsored Listing
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

Click the +1 button  below to share it with your friends and colleagues

 

Share this if you liked it!

 

Disclaimer



Who's online

There are currently 1 user and 21 guests online.

Online users

  • zcsertrheyd
Dr. Radut | forum