当我插入所有主题值时,我正在尝试计算表中的总值。 这是我的plsql代码:
CREATE OR REPLACE TRIGGER stud_marks before INSERT OR UPDATE ON student_report
FOR EACH ROW
BEGIN
set new.total := :new.sub1 + :new.sub2 + :new.sub3;
END;
这是我得到的错误:
Warning: Trigger created with compilation errors.
SQL> show error; Errors for TRIGGER STUD_MARKS:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/1 PL/SQL: SQL Statement ignored 2/5 PL/SQL: ORA-00922: missing or invalid option