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?
+5
A:
Use the RETURNING clause:
insert into mytable (...) values (...)
returning id into v_id;
Tony Andrews
2010-06-28 08:50:24