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
Post a Comment