RE: [GENERAL] How to get seq after insert
От | Brian |
---|---|
Тема | RE: [GENERAL] How to get seq after insert |
Дата | |
Msg-id | Pine.LNX.4.10.9904141651080.19854-100000@mercury.shreve.net обсуждение исходный текст |
Ответ на | RE: [GENERAL] How to get seq after insert (Michael Davis <michael.davis@tvguide.com>) |
Ответы |
Re: [GENERAL] How to get seq after insert]
|
Список | pgsql-general |
On Wed, 14 Apr 1999, Michael Davis wrote: > The safest way is to select the nextval('seq_name') and then insert using > this value. I understand, I just thought something like, I do the insert, and then grab the value with: $insertid = $sth->{'insertid'}; assuming field "insertid" was the one being updated by the sequence, but that doenst seem to work. > > -----Original Message----- > From: Brian [SMTP:signal@shreve.net] > Sent: Wednesday, April 14, 1999 2:59 PM > To: pgsql-general@postgreSQL.org > Subject: [GENERAL] How to get seq after insert > > > I have a sequence in a table that increments upon insert. After > doing the > insert, is their a way (function maybe?) to get the sequences value > without having to do another select? > > Brian > > > ----------------------------------------------------- > Brian Feeny (BF304) signal@shreve.net > 318-222-2638 x 109 http://www.shreve.net/~signal > Network Administrator ShreveNet Inc. (ASN 11881) > > ----------------------------------------------------- Brian Feeny (BF304) signal@shreve.net 318-222-2638 x 109 http://www.shreve.net/~signal Network Administrator ShreveNet Inc. (ASN 11881)
В списке pgsql-general по дате отправления: