Answered by:
How can we create FK-KEY column on different DB tables-azure sql

Question
-
We have two data base in Azure sql. country(Countryid, CountryName) table in A1 data base and language(Id, LanguageName,CountryId) table in B1 data base. How can we add foreign key(CountryId) in language table.
- Moved by Dave PatrickMVP Monday, June 3, 2019 6:13 PM looking for forum
Monday, June 3, 2019 5:46 PM
Answers
-
I'd try asking for help over here.
https://social.msdn.microsoft.com/Forums/azure/en-US/home?forum=ssdsgetstarted
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Tuesday, June 4, 2019 2:26 PM
- Marked as answer by pituachMVP Tuesday, June 11, 2019 1:39 AM
Monday, June 3, 2019 6:13 PM
All replies
-
I'd try asking for help over here.
https://social.msdn.microsoft.com/Forums/azure/en-US/home?forum=ssdsgetstarted
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows Server] Datacenter Management
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees, and confers no rights.- Proposed as answer by Richard MuellerMVP, Banned Tuesday, June 4, 2019 2:26 PM
- Marked as answer by pituachMVP Tuesday, June 11, 2019 1:39 AM
Monday, June 3, 2019 6:13 PM -
- Proposed as answer by Richard MuellerMVP, Banned Tuesday, June 4, 2019 2:26 PM
Tuesday, June 4, 2019 7:11 AM -
Good day,
Actually this question is related to Azyre SQL Database as the kumarsyd mentioned and the best forum for this question is the first link which DFave provide, which is the Azure SQL Database forum.
Anyhow the answer is that Azure SQL Database does not supports cross database queries directly. This make sense once we remember that the "server" which we mange is not a real server but only application which give us a feel and look as we manage a server while in reality is nothing more then virtual server. The databases which seems to use under a single server actually might be two unrelated databases on two different physical machines. Therefore, it is not like queries that use two databases in the same instance and cross databases queries are not supported directly
But you can use external tables to make the connections between two databases. Another option is to use Elastic tools to manage multiple databases together and cross queries (this allows us to manage shard databases as well).
Ronen Ariely
[Personal Site] [Blog] [Facebook] [Linkedin]Tuesday, June 11, 2019 1:39 AM