I dont have much experience with oracle but I'm looking to retrive the
last inserted ID in an Oracle table.  However I want to do it as
generically as possible because in my particular application I will only
know the table name and primary key field.  I will not know how the
primary key field is setup (UUID, AutoIncrement, other, etc.).

My query for a msSQL database will look something like this:

>INSERT INTO jobs (job_desc,min_lvl,max_lvl)
>VALUES ('Accountant',12,125)
>SELECT @@IDENTITY AS 'Identity'

Which I belive would return the last inserted id from the jobs
table.  Does Oracle have some sort of equivalent function?  I know that
oracle uses sequences a lot, and I belive that a sequence can be shared
among multiple tables right?  Therefore is there any way to get the
sequence that a oracle table uses and then query the sequence for its last
inserted id or something?

THanks,
Brian



------------------------------------------------------------------------------
Archives: http://www.eGroups.com/list/cf-talk
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to