Writing a trigger to insert into table-2 after insert into Table-One would achieve the required effect, wouldn't it?
;-) Dickie Bird
Honi soit qui mal y pense
Allowing more than one table to be updated in the same UPDATE statement would be very useful sometimes.
It would, for example, be nice to avoid that a costly WHERE-clause is evaluated more than once.
However, there are some special problems that would have to be solved for such an implementation.
A straight forward implementation could, for example, support the following statement:
update T1,T2 set T1.C1 = T2.C1
where T1.PK = 1 and T2.PK in (1,2)
I am still updating only one table, but the search condition is really doing a join. The problem is that I may find two rows in T2 for the same row in T1. Should the T1.C1 value be set to the T2.C1 value corresponding to T2.PK = 1 or to T2.PK = 2.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.