I need help writing a MySQL trigger.
Suppose you have a student database with the following tables:
ENROLLMENT(SSN, CLASS_NO, GRADE)
CLASS(CLASS_NO, CLASS_TITLE, NO_OF_STUDENTS).
I need to write a trigger to increase the NO_OF_STUDENTS by one if a new student is added to the ENROLLMENT table for that CLASS_NO.
you can use mysql trigger to do this. Try something like