This is basically how my database looks like
ID | descendant | father | mother --------------------------------- 1 X Y Z 2 Y A B
Letters X,Y,Z,A,B represents some code or number
For example if I change code Y to R in line 1 (ID=1) I would like to change every field where I have code Y to code R or vice versa, if I change Y to R in line 2 so automatically would be change Y to R in line 1
The most important thing is if some code is changed to another, like I sad Y to R or to G whatever, every record in database that has code Y should be changed to R or G.
Could I do that with triggers. Or what other way could be used. (My users has ability to change record via my C# application)
Use triggers like this, one for each field:
(If the
descendantcolumn is unique, you don’t need to update it.)