"Cannot create foreign key constraint on a candidate key that is also a foreign key."
Item | Description |
---|---|
SQLCode |
-1000186L |
Constant |
EMSG_CKEY_IS_ALSO_FKEY |
SQLState |
QNA40 |
ODBC 2 State |
ERROR |
ODBC 3 State |
ERROR |
Sybase Error Code |
20846 |
Severity Code |
A candidate key cannot also be a foreign key. Here's an example illustrating what is meant by this exception. (1) A [pk] <----- B [fk] [pk] <-- ADD THIS ONE -- C[fk] (2) A [pk] <-- ADD THIS ONE -- B[fk] [pk] <------- C[fk] In case (1), adding foreign key C[fk] is disallowed. In case (2), adding foreign key B[fk] is disallowed.