How to Update the primary key of table which is referenced as foreign key in another table?

Posted by Mobin on Stack Overflow See other posts from Stack Overflow or by Mobin
Published on 2010-05-12T12:21:50Z Indexed on 2010/05/12 12:24 UTC
Read the original article Hit count: 276

Filed under:
|

Suppose a Table "Person" having columns "SSN","Name","Address" and another Table "Contacts" having "Contact_ID","Contact_Type","SSN"(primary key of Person) similarly Table "Records" having "Record_ID","Record_Type","SSN"(primary key of Person)

Now i want that when i change or update SSN in person table that accordingly changes in other 2 tables.

  1. If anyone can help me with a trigger for that
  2. Or how to pass foreign key constraints for tables

© Stack Overflow or respective owner

Related posts about sql

Related posts about c#