On Tue, Nov 27, 2007 at 11:59:20AM -0700, m h wrote:
On Nov 27, 2007 11:53 AM, Niels Nes
wrote: On Tue, Nov 27, 2007 at 11:35:35AM -0700, m h wrote:
create sequence seq as integer; select next value for seq;
Ok, (sorry if I'm being slow). So if a table has an autoincremented column, is that using sequences? Can I pull the next value out using SQL? auto_increment uses (anonymous) sequence numbers and its default value is set to 'next value for';
Great. Is there a way to ask sequences for the previous value? Or is it only next? only next.
So if I use SERIAL or AUTOINCREMENT columns, what is the way to get the most recently inserted ID? (Am assumming it's not possible?) not possible or revert the process x = select next value for seq; (x in python i mean). insert into .. etc
Niels
------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users
-- Niels Nes, Centre for Mathematics and Computer Science (CWI) Kruislaan 413, 1098 SJ Amsterdam, The Netherlands room C0.02, phone ++31 20 592-4098, fax ++31 20 592-4312 url: http://www.cwi.nl/~niels e-mail: Niels.Nes@cwi.nl