What is the difference between check and foreign key?
- by GigaPr
Hi,
i am quite confused about the difference between a FOREIGN KEY and CHECK constraint.
they appear to me to achieve the same result.
I mean I could create a table and enforce a Foreign key on another table, but i could create
a CHECK to ensure the value in in another table.
What is the difference and when to use the one or the other?
thanks