gpt4 book ai didi

asp.net - SQL Server 2008中两个数据库之间的外键关系

转载 作者:行者123 更新时间:2023-12-02 18:44:22 25 4
gpt4 key购买 nike

我有两个数据库,是否可以在 SQL Server 2008 中的不同数据库中的两个表之间创建外键?

谢谢

最佳答案

From Books Online :

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/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com