Trigger cant read the table, after being fired by the same table
问题 Lets say I have a table as follows-- create table employees ( eno number(4) not null primary key, ename varchar2(30), zip number(5) references zipcodes, hdate date ); I've created a trigger using the following code block create or replace TRIGGER COPY_LAST_ONO AFTER INSERT ON ORDERS FOR EACH ROW DECLARE ID_FROM_ORDER_TABLE VARCHAR2(10); BEGIN SELECT MAX(ORDERS.ONO)INTO ID_FROM_ORDER_TABLE from ORDERS ; DBMS_OUTPUT.PUT_LINE(ID_FROM_ORDER_TABLE); INSERT INTO BACKUP_ONO VALUES( VALUE1, VALUE2