2

I have two database DB1 with table TBL1, DB2 with table TBL2, and I need a foreign key in [TBL1] (in DB1) to reference the other table [TBL2] (in DB2).

When I try to create them through SQL, I received the following error message :

Msg 1763, Level 16, State 0, Line 1
Cross-database foreign key references are not supported. Foreign key 'SAMPLEDB..VENDOR'.

Is that possible to refer foreign key in external database?

If possible, please give solution for this. If not possible, please suggest some alternate way.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

0 Answers0