Referencing
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 2 of 2

Thread: Referencing

  1. #1
    Join Date
    Sep 2002
    Posts
    376

    Referencing

    hi,

    I think foreign key doesn't work if the referecing column is not a Primary key.
    Is there any work around for this ? I need to check the column value in a X table, before inserting data into a Y table; but the column in X tabe is not a primary key.

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    foreign key

    Integrity constraint that requires each value in a column or set of columns to match a value in a related table's UNIQUE or PRIMARY KEY.
    Trigger
    before insert or update...
    perform a query (for existence) on the other table to see if the value exists is one way.

Posting Permissions

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



Click Here to Expand Forum to Full Width