RETURNING clause in 8.2

Started by Brandon Metcalfalmost 18 years ago2 messagesgeneral
Jump to latest
#1Brandon Metcalf
bmetcalf@nortel.com

I see that 8.2 has added a RETURNING clause option to the INSERT
command. Is there anyway to achieve the same thing in versions prior
to 8.2? Specifically, I need to return a default sequence number
generated from an INSERT.

Thanks.

--
Brandon

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: Brandon Metcalf (#1)
Re: RETURNING clause in 8.2

On Wed, Jun 18, 2008 at 1:32 PM, Brandon Metcalf <bmetcalf@nortel.com> wrote:

I see that 8.2 has added a RETURNING clause option to the INSERT
command. Is there anyway to achieve the same thing in versions prior
to 8.2? Specifically, I need to return a default sequence number
generated from an INSERT.

Not really the same. You can use currval('seqname') in versions before 8.2