Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
programer
Posting Yak Master
221 Posts |
Posted - 2010-11-01 : 12:33:46
|
Hi,I have two table.First table is column ID, FirstNameSecond table is column ID, FirstName.Data:First tableID, FirstName1, FirstName2,FirstName3,FirstName4,FirstName5,FirstNameSecond tableID, FirstName1, FirstName2,FirstName3,FirstName4,FirstName5,FirstNameCascade delete functions.If I delete the first table ID 2, is also deleted in another table.But I have a problem with the update data.in the first table I want in the data ID = 4 replace FirstName4However, in another table, this information does not change.In this case, the table should look like:Data:First tableID FirstName1, FirstName2, FirstName3, FirstName4, FirstName4 - switch5, FirstNameSecond tableID FirstName1, FirstName2, FirstName3, FirstName4, FirstName4 automatically be replaced.5, FirstNamePlease help |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-11-01 : 12:40:45
|
you need to write a trigger on your table 1 for doing this operations on table 2 automatically------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-11-01 : 12:59:20
|
As far as I know cascading referential integrity considers the keys and not some "other" columns. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
|
|
|
|