Re: last insert
Posted in 2000
Martin: Is this what you are looking for: Taken from the Syntax manual: The following example uses the 'sqlca.sqlerrd1' option: EXEC SQL create table fst_tab (ordernum serial, partnum int); EXEC SQL create table sec_tab (ordernum serial); EXEC SQL insert into fst_tab VALUES (0,1); EXEC SQL insert into fst_tab VALUES (0,4); EXEC SQL insert into fst_tab VALUES (0,6); EXEC SQL insert into sec_tab values (dbinfo('sqlca.sqlerrd1')); Steve Romankiw ----- Original Message ----- From: "Martin A. Marques" <martin@math.unl.edu.ar> To: "Obnoxio The Clown" <obnoxio@hotmail.com>; <martin@math.unl.edu.ar>; <informix-list@iiug.org> Sent: Wednesday, June 28, 2000 8:51 AM Subject: Re: last insert > On Wed, 28 Jun 2000, Obnoxio The Clown wrote: > > From: "Martin A. Marques" <martin@math.unl.edu.ar> > > > > > >is there a way to get the value of the last inserted element of a > > >determined > > >column of a table? > > > > Depends on many things, but probably not. > > OK! Lets say I inserted a row, which has a SERIAL data column (and some other > columns), which is autoincremental, and I insert a 0! How do I get the number > that Informix put in that column to reference that row on another table? > > > -- > "And I'm happy, because you make me feel good, about me." - Melvin Udall > ----------------------------------------------------------------- > Mart'n Marqu's email: martin@math.unl.edu.ar > Santa Fe - Argentina http://math.unl.edu.ar/~martin/ > Administrador de sistemas en math.unl.edu.ar > -----------------------------------------------------------------