Received: from ibm.cicnet.ro (ns.cicnet.ro [193.226.135.25]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0IINR082217 for ; Thu, 18 Jan 2001 13:23:30 -0500 (EST) (envelope-from george@cicnet.ro) Received: from cicnet.ro (IDENT:george@george.cicnet.ro [193.231.113.93]) by ibm.cicnet.ro (8.10.2/8.10.2) with ESMTP id f0ILVPP03461; Thu, 18 Jan 2001 23:31:25 +0200 Message-ID: <3A673367.D8D5F99B@cicnet.ro> Date: Thu, 18 Jan 2001 20:18:15 +0200 From: George Moga Organization: DataSystems Srl Slobozia X-Mailer: Mozilla 4.75 [en] (X11; U; Linux 2.2.17-21mdk i686) X-Accept-Language: en MIME-Version: 1.0 To: Najm Hashmi , pgsql-sql@postgresql.org Subject: Re: Selecting Current value from a sequence References: <3A688085.23E57E79@mondo-live.com> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Archive-Number: 200101/218 X-Sequence-Number: 883 Najm Hashmi wrote: > Hi all, > It is a very simple but I am not able to recall how to do it.... I > just need to find out the current value of a seq. It is very simple > select statement but I can't recall it... Help me please before I get > myself get fired -:). > Try: SELECT last_value FROM sequence_name; > Regards, Najm For me works (PostgreSQL 7.0.3, Mandrake Linux 7.2). George Moga, Data Systems Srl Slobozia, ROMANIA