Re: get sequence number for a row just inserted?

From: DA Morgan <damorgan_at_psoug.org>
Date: Thu, 11 Dec 2008 17:17:51 -0800
Message-ID: <1229044675.490767@bubbleator.drizzle.com>


mh_at_pixar.com wrote:
> What's the most canonical way get the autoincremented sequence number of a
> row I just inserted?

Two ways: One is to use CURRVAL
http://www.psoug.org/reference/sequences.html

The other the RETURNING clause

http://www.psoug.org/reference/insert.html
http://www.psoug.org/reference/update.html
http://www.psoug.org/reference/delete.html
-- 
Daniel A. Morgan
Oracle Ace Director & Instructor
University of Washington
damorgan_at_x.washington.edu (replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Received on Thu Dec 11 2008 - 19:17:51 CST

Original text of this message