Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
可能重复: 如何获取表中的最后一行 - Oracle 11g?
我想知道如何获取最后插入的记录值,因为我想检索并查看最后插入表中的详细信息
insert into mytable (...) values (...) returning id into v_id;
如果您有主键:
select * from YOURTABLE where primary_key=(select max(primary_key) from YOURTABLE)