simultaneous updations and deletions between databases - 07-18-2004 , 01:35 PM
hello to all,
there are two databases named A and B.
One database contains employee id as primary
I have another project database which includes that employee id as
foreign key. How can I reflect my updations,deletions
thank you in advance,
Re: simultaneous updations and deletions between databases - 07-18-2004 , 03:17 PM
If you have two databases then you can not have a FK defined between the
two. At a guess you actully have two tables with a FK defined between them.
To reflect changes to the referenced table in the referencing table then use
the cascade options on the FK. If you are using CREATE TABLE statements to
create the FKs then use the ON DELETE CASCADE, to reflect updates to the
referenced keys use ON UPDATE CASCADE. If you are using the diagramming tool
in SQL Server Enterprise Manager check the cascade update related fields and
cascade delete related records on the relationships tab.
"vishnu mahendra" <vishnu_mahendra (AT) yahoo (DOT) com> wrote