title: Relational Database (H2, Java): How do I constrain a foreign key to NOT match another foreign key in the same table?
body: <p>Simple question.  Just wondering if this can be done without me having to enforce this constraint manually in my Java code.  These two foreign keys (together in the same table) both refer out to another table, but for each row, they must not be allowed to point to the same foreign item.</p>
  
  <p><a href="http://www.h2database.com/html/grammar.html" rel="nofollow noreferrer">link text</a></p>