How to get back the current count of a auto incrementing number.

Started by sid towabout 21 years ago5 messagesgeneral
Jump to latest
#1sid tow
siddy_tow@yahoo.com

hi

How to get the current value of a auto
incrementing number generated using CREATE SEQUENCE
seqname START 1

Is there any way and if yes what is it. Can we run a
select query and may be a inbuilt function which will
return the current value of that number?

Regards.

__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

#2Csaba Nagy
nagy@ecircle-ag.com
In reply to: sid tow (#1)
Re: How to get back the current count of a auto

Sid,

Postgres has an excellent documentation. You can find about what you
asked here:
http://www.postgresql.org/docs/8.0/static/functions-sequence.html
It always pays off to read the docs first.

Cheers,
Csaba.

Show quoted text

On Fri, 2005-01-28 at 12:36, sid tow wrote:

hi

How to get the current value of a auto
incrementing number generated using CREATE SEQUENCE
seqname START 1

Is there any way and if yes what is it. Can we run a
select query and may be a inbuilt function which will
return the current value of that number?

Regards.

__________________________________
Do you Yahoo!?
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

#3Shridhar Daithankar
ghodechhap@ghodechhap.net
In reply to: sid tow (#1)
Re: How to get back the current count of a auto incrementing number.

On Friday 28 Jan 2005 5:06 pm, sid tow wrote:

hi

How to get the current value of a auto
incrementing number generated using CREATE SEQUENCE
seqname START 1

Is there any way and if yes what is it. Can we run a
select query and may be a inbuilt function which will
return the current value of that number?

http://www.postgresql.org/docs/8.0/static/functions-sequence.html

HTH

Shridhar

#4Sean Davis
sdavis2@mail.nih.gov
In reply to: sid tow (#1)
Re: How to get back the current count of a auto incrementing number.

On Jan 28, 2005, at 6:36 AM, sid tow wrote:

hi

How to get the current value of a auto
incrementing number generated using CREATE SEQUENCE
seqname START 1

Is there any way and if yes what is it. Can we run a
select query and may be a inbuilt function which will
return the current value of that number?

Look at:

http://www.postgresql.org/docs/8.0/interactive/functions-sequence.html

Sean

#5Pierre-Frédéric Caillaud
lists@boutiquenumerique.com
In reply to: sid tow (#1)
Re: How to get back the current count of a auto incrementing number.

This question pops about once a day...
can't the list server grep for "auto increment" and send a link to the
docs itself ;)

Show quoted text

hi

How to get the current value of a auto
incrementing number generated using CREATE SEQUENCE
seqname START 1

Is there any way and if yes what is it. Can we run a
select query and may be a inbuilt function which will
return the current value of that number?

Regards.