【发布时间】:2017-02-11 03:29:38
【问题描述】:
我是 PL/SQL 的新手 我试图将删除的记录保存到临时表中。为此,我按如下方式触发:
create or replace trigger aa
before delete on master_table
declare
v_id number(2);
begin
select id into v_id from master_table;
insert into temp_table values(v_id);
end;
/
但是当我尝试从 master_table 中删除记录时,会抛出这些异常:
ORA-01422: exact fetch returns more than requested number of rows
ORA-06512: at "SYSTEM.AA", line 4
ORA-04088: error during execution of trigger 'SYSTEM.AA'
提前谢谢你。
【问题讨论】: