title: What is the difference between check and foreign key?
body: <p>i am quite confused about the difference between a FOREIGN KEY and CHECK constraint - they appear to me to achieve the same result. </p>
  
  <p>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.</p>
  
  <p>What is the difference and when to use the one or the other?</p>