I have a question regarding trigger.
Let's say I have two tables, one called 'studentData' and the other 'studentStanding'.
'studentData' is a table consist of teacherID, studentID and rating.
So different teacher may give different rating to a single student
studentStanding is table consist of studentID, studentName and averageRating.
CREATE TRIGGER updateAVG
AFTER INSERT ON studentData
REFERENCING NEW AS N_ROW
FOR EACH ROW
UPDATE studentStanding SET Rating = (
CREATE TRIGGER computeAvg AFTER INSERT ON studentData FOR EACH ROW UPDATE studentStanding SET averageRating = (SELECT AVG(rating) from studentData where studentStanding.studentID=studentData.studentID) WHERE studentID = NEW.studentID;