Re: [SQL] Getting last insert value

2003-11-19 Thread Yasir Malik
Guillaume, Thank you very much for your response. Yasir On Sat, 15 Nov 2003, Guillaume LELARGE wrote: > Date: Sat, 15 Nov 2003 17:41:41 + > From: Guillaume LELARGE <[EMAIL PROTECTED]> > To: [EMAIL PROTECTED] > Subject: Re: [SQL] Getting last insert value > > Le Samed

Re: [SQL] Getting last insert value

2003-11-15 Thread Theodore Petrosky
what does that mean the 'last row'? if client 1 inserts then client 2, the last row is client 2. do you want to know what row client 1 inserted? Personally I think your question is too broad. What are you trying to accomplish? Ted --- Yasir Malik <[EMAIL PROTECTED]> wrote: > Hello, > I have a ta

Re: [SQL] Getting last insert value

2003-11-15 Thread Yasir Malik
Thank you all for your help. Yasir Malik On Sat, 15 Nov 2003, Greg Stark wrote: > Date: 15 Nov 2003 12:50:28 -0500 > From: Greg Stark <[EMAIL PROTECTED]> > To: Guillaume LELARGE <[EMAIL PROTECTED]> > Cc: Yasir Malik <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > Subje

Re: [SQL] Getting last insert value

2003-11-15 Thread Greg Stark
Guillaume LELARGE <[EMAIL PROTECTED]> writes: > Doing a "select currval() from my_table" after your insert should work. That's "select currval('my_table_pkcol_seq')" actually. The above would have called the currval() function for every record of the table which isn't what you want and in any

Re: [SQL] Getting last insert value

2003-11-15 Thread Guillaume LELARGE
Le Samedi 15 Novembre 2003 16:40, vous avez écrit : > Doing a "select currval() from my_table" after your insert should work. > Actually, this is select currval('my_sequence') Sorry about this. > For more details, see > http://www.postgresql.org/docs/7.3/interactive/functions-sequence.html -

Re: [SQL] Getting last insert value

2003-11-15 Thread Guillaume LELARGE
Le Samedi 15 Novembre 2003 15:18, vous avez écrit : > Hello, > I have a table with many fields, and one of the fields is of type serial. > I will do many inserts, and there will be many repeats of the other fields > in the table, but, obviously, the serial field will be unique for all the > rows.