我有两个数据库,是否可以在 SQL Server 2008 中的不同数据库中的两个表之间创建外键?
谢谢
最佳答案
A FOREIGN KEY constraint can reference columns in tables in the same database or within the same table.
因此,您不能在不同数据库的两个表之间创建外键约束。
这是使用多个数据库的缺点之一。
关于asp.net - SQL Server 2008中两个数据库之间的外键关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8208772/