I want to retrieve the id of a newly inserted record with an auto incrementing id column (using the sequence and trigger method). What is the standard way to do this?
Use the PL/SQL RETURNING clause:
RETURNING
insert into mytable (...) values (...) returning id into v_id;
1.4m articles
1.4m replys
5 comments
57.0k users