CREATE OR REPLACE TRIGGER btinsert
BEFORE INSERT ON sample
BEGIN
IF (TO_CHAR(SYSDATE,'HH24:MI')
NOT BETWEEN ('08:00' AND '22:00') THEN
RAISE_APPLICATION_ERROR(-20500, 'you may insert'
||' into EMPLOYEES table only during '
||' normal business hours.');
END IF;
END;
但我收到一个错误:
第 8 行出现错误:PLS-00103:遇到符号“END”
6. RAISE_APPLICATION_ERROR(-20500, 'you may insert'
7. ||' 仅在 '
8.||' 正常工作时间进入 EMPLOYEES 表。');
9. 结束如果;
10.结束;