title: Cross-database foreign key
body: <p>I have two database <code>DB1</code> with table <code>TBL1</code>, <code>DB2</code> with table <code>TBL2</code>, and I need a foreign key in <code>[TBL1]</code> (in <code>DB1</code>) to reference the other table <code>[TBL2]</code> (in <code>DB2</code>).</p>
  
  <p>When I try to create them through SQL, I received the following error message :</p>
  
  <blockquote>
    <p>Msg 1763, Level 16, State 0, Line 1<br>
    Cross-database foreign key references are not supported. Foreign key 'SAMPLEDB..VENDOR'.  </p>
  </blockquote>
  
  <p>Is that possible to refer foreign key in external database?</p>
  
  <p>If possible, please give solution for this. If not possible, please suggest some alternate way. </p>