From: Hunter, Ray <rhunter@enterasys.com>
To: pgsql-sql@postgresql.org
Subject: Sequences
Date: Mon, 11 Feb 2002 08:43:23 -0500
Message-ID: <59358A738F45D51186A30008C74CE250E81373@slc-exc1.ctron.com> (raw)
I have various sequences in my database set up for ids. My question is:
How can I get the current value of the sequence without creating a session
and using the currval function?
I would like to take the current value of the sequence and use it for a
value in an insert statement.
Example:
insert into users ( "user_id", "user_fname", "user_lname",
"user_email" )
values ( 'current sequence', 'Ray', 'Hunter',
'rhunter@enterasys.com' );
Thanks,
Ray Hunter
Firmware Engineer
ENTERASYS NETWORKS
Phone: 801 887-9888
Fax: 801 972-5789
Email: rhunter@enterasys.com <mailto:rhunter@enterasys.com>
www: www.enterasys.com <http://www.enterasys.com;
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: rhunter@enterasys.com
Subject: Re: Sequences
In-Reply-To: <59358A738F45D51186A30008C74CE250E81373@slc-exc1.ctron.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox