-538 FOREIGN KEY name DOES NOT CONFORM TO THE DESCRIPTION OF A PARENT KEY OF TABLE table-name
Explanation
The definition of the indicated foreign key does not conform to the description of parent key of the indicated table due to one of the following reasons:
- The referenced parent key has not been defined as a primary key or a unique key.
- The keys do not have the same number of columns.
- The description of the keys are not identical. The requirement for identical descriptions includes data type, length attribute, and field procedure.
name is the constraint-name specified in the foreign key clause or, if a constraint-name was not specified, the first column-name specified in the clause.
System action
The statement cannot be processed.
Programmer response
Correct the statement so that the description of the foreign key references a primary key or unique key, or so that the description of the foreign key conforms to that of a parent key of the indicated table.
SQLSTATE
42830