Link to home
Start Free TrialLog in
Avatar of pmaltais
pmaltais

asked on

How to get the record ID of a newly inserted record

Hi,

I insert a record in a table wich have an auto-increment ID column. I want to retrieve the newly inserted record by reading the generated ID.

I"m using Oracle 10g. What is the best way to do this? I'm looking for something similar than @@Identity in SQL Server.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of Sean Stuber
Sean Stuber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
in oracle, the "identity" is translated into a sequence object, eventually combined with a trigger:
http://www.techonthenet.com/oracle/sequences.php
http://www.databaseanswers.org/sql_scripts/ora_sequence.htm