Re: getting currval from a sequence - Mailing list pgsql-general

From Bruno Wolff III
Subject Re: getting currval from a sequence
Date
Msg-id 20020211134611.GB3472@wolff.to
Whole thread Raw
In response to getting currval from a sequence  (tony <tony@animaproductions.com>)
Responses Re: getting currval from a sequence
List pgsql-general
On Mon, Feb 11, 2002 at 11:42:31AM +0100,
  tony <tony@animaproductions.com> wrote:
>
> How does one get the last record from a series of records? I just need
> the id field which is a sequence field

select max(id) from whatever;
(This assumes the sequence hasn't rolled over.)

pgsql-general by date:

Previous
From: "Cornelia Boenigk"
Date:
Subject: timespan_part()?
Next
From: Karel Zak
Date:
Subject: Re: timespan_part()?