Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2001
    Posts
    1

    Unanswered: Foreign Key constrain point to 2 tables.

    I have a table with a foreign key constraint pointing to another table.

    Problem is I want it to point to two tables.

    Can not insert into this table unlest the id exists in one of these two tables, but not both.

    The not both part is not as important.

    Any clue how/if this can be done.

  2. #2
    Join Date
    Jan 2002
    Location
    italy
    Posts
    39
    Hello!!!
    I'm not sure that what you are asking may be done using constraints, however you can write a trigger before insert for each row to enforce more complex integrity rules, like the one you need.

    Let me know if you succeed in creating your rule only with constraints.

    bye,
    astropp

  3. #3
    Join Date
    Jan 2002
    Location
    NY
    Posts
    5
    Trigger's the best way to go

  4. #4
    Join Date
    Jan 2002
    Location
    NY
    Posts
    5
    Trigger's the best way to go

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •