Re: FW: reset all sequences

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

 



On Tue, 9 May 2006, Pascal Tufenkji wrote:

> How can I reset the sequence to "1"
>
> If I use the following statement
>
> Select setval('mytable_id_seq',1);
>
> I put the last value as 1
>
> So when I insert a new row the value will be "2" and not "1" as it should be
>
> I cannot put Select setval('mytable_id_seq',0);
>
> What should I do ??!!

You should be able to do this with the three argument form of setval as
setval('mytable_id_seq',1,false).


[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux