database - adding a trigger in mysql to change a content on update -


i want add mysql trigger on update function. should triggered on updating specific column of 1 table 'available teachers' , update specific column of table 'available subjects'. how achievable?

i believe checking change in old , new field after update of teachers table update available column of subjects it.

if not (new.teachers.available <=> old.teachers.available)   set new.subject.available = new.teachers.available; end if;; 

it should right?


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

[C++][SFML 2.2] Strange Performance Issues - Moving Mouse Lowers CPU Usage -

ios - Possible to get UIButton sizeThatFits to work? -