Get ID of last inserted record in oracle db
I want to retrieve the id of a newly inserted record with an auto incrementing id column (usi开发者_运维知识库ng the sequence and trigger method). What is the standard way to do this?
Use the PL/SQL RETURNING
clause:
insert into mytable (...) values (...)
returning id into v_id;
精彩评论