我是用powerdesigner生成触发器的,头文件已经删除。查看具体错误信息时显示:
TRIGGER WEN.COMPOUNDUPDATETRIGGER_HRM_USER 编译错误
错误:PLS-00103: 出现符号 "/"在需要下列之一时:
function pragma
procedure subtype type
current cursor delete
exists prior before after instead
行:8
文本:NULL;
生成的触发器脚本如下:
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_DEPT
FOR DELETE ON HRM_DEPT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDINSERTTRIGGER_HRM_DEPT
FOR INSERT ON HRM_DEPT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDUPDATETRIGGER_HRM_DEPT
FOR UPDATE ON HRM_DEPT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE TRIGGER TIB_HRM_DEPT BEFORE INSERT
ON HRM_DEPT FOR EACH ROW
DECLARE
INTEGRITY_ERROR EXCEPTION;
ERRNO INTEGER;
ERRMSG CHAR(200);
DUMMY INTEGER;
FOUND BOOLEAN;
BEGIN
-- COLUMN "ID" USES SEQUENCE SEQUENCE_1
SELECT SEQUENCE_1.NEXTVAL INTO :NEW.ID FROM DUAL;
-- ERRORS HANDLING
EXCEPTION
WHEN INTEGRITY_ERROR THEN
RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
END;
/
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_DOCU
FOR DELETE ON HRM_DOCUMENT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDINSERTTRIGGER_HRM_DOCU
FOR INSERT ON HRM_DOCUMENT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDUPDATETRIGGER_HRM_DOCU
FOR UPDATE ON HRM_DOCUMENT COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE TRIGGER TIB_HRM_DOCUMENT BEFORE INSERT
ON HRM_DOCUMENT FOR EACH ROW
DECLARE
INTEGRITY_ERROR EXCEPTION;
ERRNO INTEGER;
ERRMSG CHAR(200);
DUMMY INTEGER;
FOUND BOOLEAN;
BEGIN
-- COLUMN "ID" USES SEQUENCE SEQUENCE_1
SELECT SEQUENCE_1.NEXTVAL INTO :NEW.ID FROM DUAL;
-- ERRORS HANDLING
EXCEPTION
WHEN INTEGRITY_ERROR THEN
RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
END;
/
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_EMPL
FOR DELETE ON HRM_EMPLOYEE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDINSERTTRIGGER_HRM_EMPL
FOR INSERT ON HRM_EMPLOYEE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDUPDATETRIGGER_HRM_EMPL
FOR UPDATE ON HRM_EMPLOYEE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE TRIGGER TIB_HRM_EMPLOYEE BEFORE INSERT
ON HRM_EMPLOYEE FOR EACH ROW
DECLARE
INTEGRITY_ERROR EXCEPTION;
ERRNO INTEGER;
ERRMSG CHAR(200);
DUMMY INTEGER;
FOUND BOOLEAN;
BEGIN
-- COLUMN "ID" USES SEQUENCE SEQUENCE_1
SELECT SEQUENCE_1.NEXTVAL INTO :NEW.ID FROM DUAL;
-- ERRORS HANDLING
EXCEPTION
WHEN INTEGRITY_ERROR THEN
RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
END;
/
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_JOB
FOR DELETE ON HRM_JOB COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDINSERTTRIGGER_HRM_JOB
FOR INSERT ON HRM_JOB COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDUPDATETRIGGER_HRM_JOB
FOR UPDATE ON HRM_JOB COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE TRIGGER TIB_HRM_JOB BEFORE INSERT
ON HRM_JOB FOR EACH ROW
DECLARE
INTEGRITY_ERROR EXCEPTION;
ERRNO INTEGER;
ERRMSG CHAR(200);
DUMMY INTEGER;
FOUND BOOLEAN;
BEGIN
-- COLUMN "ID" USES SEQUENCE SEQUENCE_1
SELECT SEQUENCE_1.NEXTVAL INTO :NEW.ID FROM DUAL;
-- ERRORS HANDLING
EXCEPTION
WHEN INTEGRITY_ERROR THEN
RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
END;
/
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_NOTI
FOR DELETE ON HRM_NOTICE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDINSERTTRIGGER_HRM_NOTI
FOR INSERT ON HRM_NOTICE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE OR REPLACE TRIGGER COMPOUNDUPDATETRIGGER_HRM_NOTI
FOR UPDATE ON HRM_NOTICE COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
CREATE TRIGGER TIB_HRM_NOTICE BEFORE INSERT
ON HRM_NOTICE FOR EACH ROW
DECLARE
INTEGRITY_ERROR EXCEPTION;
ERRNO INTEGER;
ERRMSG CHAR(200);
DUMMY INTEGER;
FOUND BOOLEAN;
BEGIN
-- COLUMN "ID" USES SEQUENCE SEQUENCE_1
SELECT SEQUENCE_1.NEXTVAL INTO :NEW.ID FROM DUAL;
-- ERRORS HANDLING
EXCEPTION
WHEN INTEGRITY_ERROR THEN
RAISE_APPLICATION_ERROR(ERRNO, ERRMSG);
END;
/
CREATE OR REPLACE TRIGGER COMPOUNDDELETETRIGGER_HRM_USER
FOR DELETE ON HRM_USER COMPOUND TRIGGER
// DECLARATION
// BODY
BEFORE STATEMENT IS
BEGIN
NULL;
END BEFORE STATEMENT;
BEFORE EACH ROW IS
BEGIN
NULL;
END BEFORE EACH ROW;
AFTER EACH ROW IS
BEGIN
NULL;
END AFTER EACH ROW;
AFTER STATEMENT IS
BEGIN
NULL;
END AFTER STATEMENT;
END
/
/