From: | Philip Hallstrom <philip(at)adhesivemedia(dot)com> |
---|---|
To: | Sonia Sanchez Diaz <sonny(at)piaget(dot)dgsca(dot)unam(dot)mx> |
Cc: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Serial types |
Date: | 2002-02-15 23:47:08 |
Message-ID: | 20020215154656.R68648-100000@teak.adhesivemedia.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
SELECT SETVAL('sequence_name', 1, 't');
should do it.
On Fri, 15 Feb 2002, Sonia Sanchez Diaz wrote:
> How Can I restart the values of a serial type field...??
>
> I mean, I have a table with id_user defined as serial type, if a delete the
> data from this table and insert new data the field id_user will start the
> counter from the last record it had saved...
>
> So... I want the new records insert into the table begins again with 1.
>
> I used alter table <table> alter id_user set default 1;
>
> But, only I could insert one record with number 1.
>
> Thanks for your answers.
>
> Sonny
>
> --
> Los amigos verdaderos se hieren con verdades,
> para no perderse con mentiras
> ---
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
>
From | Date | Subject | |
---|---|---|---|
Next Message | Vince Vielhaber | 2002-02-15 23:53:21 | Re: Powered by PostgreSQL logos/icons/images... |
Previous Message | Sean Chittenden | 2002-02-15 23:44:59 | Re: Powered by PostgreSQL logos/icons/images... |