Previous Topic: -168 - THE TABLE ALREADY HAS A PRIMARY KEY, ONLY ONE MAY BE DEFINEDNext Topic: -171 - THE REFERENCED TABLE DOES NOT CONTAIN A PRIMARY KEY


-169 - THE REFERENCED COLUMNS DID NOT REFER TO A CANDIDATE KEY

Explanation

During a CREATE or ALTER TABLE, you attempted to define a foreign key reference to a list of columns, but those columns were not contained in a primary or unique key definition.

The SQLSTATE that equates to this SQL return code is 42890.

User Response

Add a primary or unique key on the referenced columns or modify the list to reference columns in a primary or unique key that is already defined.