ps:我是pl / sql的初学者 我对这个trigers有一些问题。它不起作用
most_common()
错误sg:
SP2-0552:变量de lien“NEW”nondéclarée
答案 0 :(得分:0)
It works for me. See below snippet of yours with compiled state.
CREATE OR REPLACE TRIGGER T_sal_emp Before
INSERT OR
UPDATE OF sal ON EMP FOR EACH row
BEGIN
IF (:New.sal>5000) THEN
Raise_application_error(-20001,'emp ne doit pas depasser 5000');
END IF;
END;
----------------------------OUTPUT--------------------------------------------------
OWNER OBJECT_NAME STATUS OBJECT_TYPE
AVROY T_SAL_EMP VALID TRIGGER
----------------------------OUTPUT-------------------------------------------------