I'm trying return id after insert:
CREATE SEQUENCE seq_osobne_udaje
INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER trig_osobne_udaje_seq
BEFORE INSERT ON osobne_udaje
FOR EACH ROW
BEGIN
SELECT seq_osobne_udaje.nextval INTO :new.id FROM dual;
END;
/
and then:
var tmp number;
insert into osobne_udaje(name,sur,born,is_man)
values('Jacob','Wulp',to_date('28.07.1992','DD.MM.YYYY'),'Y')
returning id into tmp;
but it write exception in insert row: SQL Error: ORA-00905: missing keyword
This script works in SQL Developer: