|
TA
id mtype mk
1 aa 123
2 bb 123
TB
id ntype Status ts
1 aa 0 123
2 bb 1 123
3 bb 0 10
----------------
Find a trigger, when mk in TA is updated, the corresponding ts in TB is also updated.
The condition for triggering TB is ntype=mtype and Status=0.
---
Such as operating on TA
update TA set mk='999' where mtype='bb'
Then TB should be:
TB
id ntype Status ts
1 aa 0 123
2 bb 1 123
3 bb 0 999
------------Find this trigger |
|