Sybase Error – Cannot create foreign key constraint on a candidate key that is also a foreign key.

In this blog post, you’ll learn more about the Sybase Error Cannot create foreign key constraint on a candidate key that is also a foreign key. and the reason for receiving this error

Sybase SQL Error Message

Cannot create foreign key constraint on a candidate key that is also a foreign key.

Reason for this Error

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.

Leave A Reply

Your email address will not be published. Required fields are marked *

You May Also Like

In this blog post, you’ll learn more about the Sybase Error Seek failed: the requested segment offset %2 is outside...
In this blog post, you’ll learn more about the Sybase Error No indicator variable provided for NULL result and the...
In this blog post, you’ll learn more about the Sybase Error %2: Memory & disk block number mismatch; buffer={%3} page={%4}....