« Return to Thread: Most efficient way to get max row id?

Re: Most efficient way to get max row id?

by PerfectReign :: Rate this Message:

Reply to Author | View in Thread

On Monday 20 October 2008 08:52:34 am derby@... 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

 « Return to Thread: Most efficient way to get max row id?