开发者

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;
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜