Re: How do you get the @@identity for the record just inserted?
Posted by: Reggie Burnett
Date: January 24, 2005 08:49AM

Yes it can be done at the same time as the insert. The following SQL is very common for this sort of thing.

"INSERT INTO mytable VALUES (NULL, ?name); select last_insert_id()"

-reggie

Options: ReplyQuote




Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.