| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Jeff <threshar(at)torgo(dot)978(dot)org>, CSN <cool_screen_name90001(at)yahoo(dot)com> |
| Cc: | pgsql-general(at)postgresql(dot)org |
| Subject: | Re: lastval(seq) ? |
| Date: | 2003-10-21 13:06:50 |
| Message-ID: | 200310211406.50334.dev@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
On Tuesday 21 October 2003 13:10, Jeff wrote:
> On Mon, 20 Oct 2003 21:52:17 -0700 (PDT)
>
> CSN <cool_screen_name90001(at)yahoo(dot)com> wrote:
> > How do you get the last value of a sequence without
> > having called nextval? phppgadmin displays last value
> > for sequences (I haven't found out how yet rooting
> > through the code).
> >
> > CSN
>
> select curval('my_sequence')
Only works if you've called nextval() first.
I'm guessing phppgadmin uses SELECT * FROM my_seq_name
What were you planning to use this value for?
--
Richard Huxton
Archonet Ltd
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Andrew Sullivan | 2003-10-21 13:28:58 | Re: Recomended FS |
| Previous Message | Cláudia Morgado | 2003-10-21 12:38:34 | DBDesigner for Linux |