How can we create FK-KEY column on different DB tables-azure sql RRS feed

  • 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.
    Monday, June 3, 2019 5:46 PM


All replies

  • I'd try asking for help over here.






    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.

    Monday, June 3, 2019 6:13 PM
  • Hello,

    you could ask here too: https://azure.microsoft.com/en-us/support/community/

    Regards, Guido

    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).

    signature   Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]    [Linkedin]

    Tuesday, June 11, 2019 1:39 AM