इस ट्रिगर को अपने व्यय तालिका में जोड़ें
CREATE TRIGGER ExpenseSum AFTER INSERT ON ExpenseTable FOR EACH ROW
BEGIN
UPDATE ProjectsTable P
SET ExpenseTotal =
(SELECT SUM(ExpenseAmount) from ExpenseTable
where ExpenseTable.ProjectID= P.ProjectID)
where P.ProjectID = New.ProjectID;
END
ट्रिगर जोड़ना न भूलें After Update
और After Delete
ExpenseTotal को अपडेट करने के लिए