Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Trigger/sequence bug in 8.1.7.2.0 and 9.0.1.3.0 and ... ?
Can someone please confirm this bug (I can't find it on metalink)...
create sequence s;
create table x (id number);
create table x_hist (id_hist number, id number);
create or replace trigger t_x
after insert on x
for each row
begin
insert into x_hist (
id_hist,
id
) values (
s.nextval,
:new.id
);
end;
/
insert into x values (s.nextval);
select * from x;
ID
1
select * from x_hist;
ID_HIST ID
------------ ------------
2 2
The value x_hist.id should be the same as x.id but it's getting changed by the trigger (or am I missing something?).
Note: the same sequence is being used for both tables.
Thanks,
Richard
Received on Tue May 28 2002 - 17:10:04 CDT