I think writing SQL as a portable as possible to cover eventual upgrades to
larger scale databases is a primary concern. The Selecting of a sequence is
more portable across various databases...
-----Original Message-----
From: Michael Davis <michael.davis@tvguide.com>
To: 'Brian' <signal@shreve.net>; pgsql-general@postgreSQL.org
<pgsql-general@postgreSQL.org>
Date: Wednesday, April 14, 1999 4:37 PM
Subject: RE: [GENERAL] How to get seq after insert
>The safest way is to select the nextval('seq_name') and then insert using
>this value.
>
> -----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)
>
>