0
CREATE TRIGGER hundert
AFTER INSERT ON Leistung
FOR EACH ROW MODE DB2SQL
WHEN(SELECT modulNR, SUM(Prozentanteil) AS summe
FROM Leistung
GROUP BY modulNr
HAVING SUM(prozentanteil) > 100)
BEGIN ATOMIC
SIGNAL SQLSTATE '23506'
SET MESSAGE_TEXT = ('The Sum is bigger then 100');
END
如何創建一個WHEN語句,如果我想說它有考試的所有「prozentanteil」如果和更大然後100?CREATE TRIGGER INSERT WHEN(條件)DB2後