Re: resetting sequence - Mailing list pgsql-sql

From Philip Hallstrom
Subject Re: resetting sequence
Date
Msg-id 20020326212937.K37166-100000@teak.adhesivemedia.com
Whole thread Raw
In response to resetting sequence  ("Kancha ." <kancha2np@yahoo.com>)
Responses Re: resetting sequence  ("Andrew G. Hammond" <drew@xyzzy.dhs.org>)
List pgsql-sql
take a look at the SETVAL function... it's something close to:

SELECT SETVAL('sequence_name', 1);

something like that.  check the manual.

On Tue, 26 Mar 2002, Kancha . wrote:

> My sequence starts from 1 and after few months it
> should be reset to 1 again. Can this be automated ??
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Movies - coverage of the 74th Academy Awards�
> http://movies.yahoo.com/
>
> ---------------------------(end of broadcast)---------------------------
> TIP 5: Have you checked our extensive FAQ?
>
> http://www.postgresql.org/users-lounge/docs/faq.html
>


pgsql-sql by date:

Previous
From: Ian Barwick
Date:
Subject: Re: Possible to do this in one query?
Next
From: Achilleus Mantzios
Date:
Subject: Re: Arrays Design Question