Bruce,
> > BTW, O'Reilly's "SQL in at Nutshell" also catalogs all PGSQL functions
> > from ver. 6.5.
>
> It does, or only the standard SQL functions? Do they have
> PostgreSQL-specific stuff.
Both. The book is set up to cover 1) the SQL99 standard, and 2)
Specific variants for SQL Serve
Clayton,
> > 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 -:).
> > Regards, Najm
>
> select
Thank you all for your help.
Najm
See my book on sequences:
http://www.postgresql.org/docs/awbook.html
currval() is probably what you need.
> 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'
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 -:).
> Regards, Najm
select nex
> Najm
>
> CURRVAL('sequence_name')
>
> For this and other sequence and serial functions, please see the online
> version of Bruce's book.
>
> BTW, O'Reilly's "SQL in at Nutshell" also catalogs all PGSQL functions
> from ver. 6.5.
It does, or only the standard SQL functions?
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 FRO
Najm
CURRVAL('sequence_name')
For this and other sequence and serial functions, please see the online
version of Bruce's book.
BTW, O'Reilly's "SQL in at Nutshell" also catalogs all PGSQL functions
from ver. 6.5.
-Josh Berkus
--
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 -:).
Regards, Najm