title: Add Foreign Key relationship between two Databases
body: <p>I have two tables in two different databases. In table1 (in database1) there is a column called column1 and it is a primary key. Now in table2 (in database2) there is a column called column2 and I want to add it as a foreign key.</p>
  
  <p>I tried to add it and it gave me the following error:</p>
  
  <blockquote>
    <p>Msg 1763, Level 16, State 0, Line 1<br>
    Cross-database foreign key references are not supported. Foreign key Database2.table2.</p>
    
    <p>Msg 1750, Level 16, State 0, Line 1<br>
    Could not create constraint. See previous errors.</p>
  </blockquote>
  
  <p>How do I do that since the tables are in different databases.</p>