db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kai Ponte <...@perfectreign.com>
Subject Re: Most efficient way to get max row id?
Date Mon, 20 Oct 2008 21:48:13 GMT
On Monday 20 October 2008 08:52:34 am derby@segel.com wrote:
> The table would consist of two columns. A label column and a counter
> column. Your stored procedure has two options. lastVal() and getNextVal(),
> getNextVal(n). (The last one is optional or could be incrementValTo(n) )

I've done this also in the past. It simply keeps track of the last value of an 
inserted item. That way a web page - disconnected recordset - can insert a 
new item then another page can grab the information from that item.



-- 
kai
www.filesite.org || www.perfectreign.com

 
Clean out a corner of your mind and creativity will instantly fill it. - Dee 
Hock

Mime
View raw message