Get ID of last inserted record in oracle db

Use the PL/SQL RETURNING clause:

insert into mytable (...) values (...)
returning id into v_id;

Leave a Comment