Saturday, 15 September 2012

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


I want to add a mysql trigger to the update function. It should be triggered when updating a specific column of a table called 'available from teachers' and updating the specific columns of another table, with 'available through the topics'. How can this be achieved?

I believe that after updating the table of teachers, after updating the available columns of the subjects, the changes in the old and new areas have to be examined.

  No (New Readers available & lt; = & gt; OLD.teachers.available) Then set new.subject.available = NEW.teachers.available; end if;;  

Should it be something like this?


No comments:

Post a Comment