CREATE or REPLACE TRIGGER trigger_name
AFTER INSERT OR UPDATE
ON table1
FOR EACH ROW
BEGIN
INSERT INTO table2
VALUES (NEW.request_id, NEW.user_concurrent_program_name,
NEW.argument_text, NEW.comments, NEW.acknowledgement_status,
SYSDATE, NEW.acknowledged_by);
END;
/
但这会引发以下错误:
LINE/COL ERROR
-------- -----------------------------------------------------------------
2/4 PL/SQL: SQL Statement ignored
3/17 PLS-00201: identifier 'NEW.REQUEST_ID' must be declared
'NEW' 不应该是插入到表中的新行详细信息吗?