Search Postgresql Archives

Re: How to reset a sequence so it will start with 1 again?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Take a look at the docs, in particular the three-parameter version of setval and the is_called flag.
http://www.postgresql.org/docs/current/interactive/functions- sequence.html

Thanks Michael,

SELECT setval('tblperson_id_seq', 1, false);
will do exactly what I supposed to get.

Nico


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux