mysql - create trigger to alter multiple tables -


i have n tables,

and each table share common column 'colx'. , each table's colx column can have independent values in column, when alters value in main table t's colx, each table's corresponding colx value must updated new value in t's colx.

i can write trigger 1 table only, how write n tables?

colxcascade triggers through tables,

table1 trigger updates table2, table2 can run triggers affect table3

create table table1 (colx int not null,                  primary key (id) );  create table table2 (id int, colx int,     index par_ind (parent_id),     foreign key (colx) references table1(colx)         on update cascade ) 

Comments

Popular posts from this blog

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -