Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with trigger/sqlca.sqlerrd[2]
Hello,
I have an urgent problem with 'serial' columns:
I created a tabel and added an sequence/ trigger (before insert) to one column.
Now I inserted rows with a c-programm.
After the row is inserted i need to read the value of the 'SERIAL' column,
but sqlca.sqlerrd[2] is always '0'.
The trigger is working - if i select the columns afterwards, the serial-numbers are correctly set.
The sequence/trigger was created as follows:
create sequence my_seq start with 1 increment by 1;
create or replace trigger my_trigger
before insert on my_table
for each row
begin
select my_seq.nextval into
:new.serial_col from dual;
end;
Many thanks for all help!!
Matthias Received on Thu Mar 09 2006 - 03:17:59 CST