这是抛出“错误:ORA-04082:表级触发器中不允许新或旧引用”
我不确定我哪里出错了。错误号不应该有所作为吗?
CREATE OR REPLACE TRIGGER REJECTION
BEFORE INSERT OR UPDATE ON TEA_PREFS_T
DECLARE temp NUMBER;
BEGIN
SELECT COUNT(*) INTO temp FROM tea_prefs_t WHERE person = :new.drinkerid;
IF (temp >=10) THEN
raise_application_error(-20101, 'ERROR: CANNOT INSERT MORE THAN 10');
ROLLBACK;
END IF;
END;