------解决方案-------------------- CREATE OR REPLACE TRIGGER trigger_cost
AFTER INSERT
ON sign
DECLARE
v_count number;
BEGIN
SELECT COUNT(*) INTO v_count
FROM sign
WHERE signer_name LIKE :NEW.signer_name;
IF v_count = 2 THEN
UPDATE sign SET sign_charge = 0.9 * sign_charge WHERE sign_course LIKE :NEW.sign_course;
ELSIF v_count = 3 THEN
UPDATE sign SET sign_charge = 0.8 * sign_charge WHERE sign_course LIKE :NEW.sign_course;
ELSIF v_count = 4 THEN
UPDATE sign SET sign_charge = 0.7 * sign_charge WHERE sign_course LIKE :NEW.sign_course;
ELSIF v_count >= 5 THEN
UPDATE sign SET sign_charge = 0.5 * sign_charge WHERE sign_course LIKE :NEW.sign_course;
ELSE
END IF;
END trigger_cost;
无效的触发器说明,哪儿错了 ------解决方案--------------------