Foreign Key Problem

  • Hi:

    I am wondering whether I can create a Foreign Key

    constraint on a column of a table in database A, which

    refences another table's column in a diffrent database B.

    I got the following error message.

    Cross-database foreign key references are not supported.

    Is there any thing that can be done to achieve this.

    Thanks for your input

  • Cross-database referential integrity must be implemented through triggers.  Keep in mind what might happen if database B were down (for maintenance or some problem) while database A tried to check for data integrity.  Your trigger should deal with this.  If there is a really close relationship perhaps database A and B should be combined.

    Francis

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply