I have two databases, is it possible to create a foreign key between two tables in different databases in SQL Server 2008?
thanks
From books on the Internet :
A FOREIGN KEY constraint can refer to columns in tables in the same database or within the same table.
Therefore, you cannot create foreign key constraints between two tables in different databases.
This is one of the disadvantages of using multiple databases.
If you use Linq2Sql or an entity infrastructure, you can do this in the designer.
But as Igor says, you cannot do this in the database itself.
Source: https://habr.com/ru/post/901979/More articles:Display google map by link or text - javascriptAlgorithm for partitioning an array into "semi-equal", uniform sub-matrices - arraysGet email id and name from Android phonebook. - androidHow to get contact email id? - androidHow to capture mouse click event in browser / go forward or hash change event in javascript? - javascriptDebug PHP memory leak. Tracking Link Counter? - phpProblems transferring background file - c #Transfer of record from Oracle array to Cobol occurs - oracleCreating objects using Guava from property files - javaHow to set a different frame rate for each animation in jQuery - jqueryAll Articles