Start of change

-20567 TABLE table-name CANNOT BE DEFINED AS A DEPENDENT OF REFERENTIAL CONSTRAINT constraint-name. REASON reason-codereason-code.

Explanation

The object of an ALTER TABLE statement cannot be defined as a dependent table in a referential constraint for the reason indicated by the reason code.

table-name
The name of the table that is named as the dependent table.
constraint-name
The name of the referential constraint in which the altered table that is the dependent table.
reason-code
The reason for the message or SQL code, indicated by one of the following values:
1
PERIOD BUSINESS_TIME was specified as part of a temporal referential constraint definition that would result in a referential cycle. The parent and child tables must not be the same table in a temporal referential constraint, and the child table must not be a descendent, directly or indirectly, of another table that is a descendent of the parent table.
2

An index that enforces a temporal referential constraint contains an INCLUDE column. This is not allowed.

System action

The statement cannot be processed.

User response

Correct the constraint definition.

SQLSTATE

42915

End of change