0

Possible Duplicate:
foreign keys on table from different database

I just wanted to know whether there is any way of creating a foreign key reference on a column on a database table to another column of a different database table (Cross DB)

Community
  • 1
  • 1
Running Rabbit
  • 2,432
  • 15
  • 42
  • 65

1 Answers1

0

No, you cannot implement a foreign key across databases.

You could use a trigger to enforce a constraint, but be aware that triggers can be disabled and there are also scenarios where they won't fire.

Aaron Bertrand
  • 261,961
  • 36
  • 448
  • 471