I use truncate table $table_name.
This will delete all data from that table and reset the sequense number.
- Original Message -
From: "Marc" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, February 23, 2002 6:37 PM
Subject: [ADMIN] Reset sequence numb
On Sat, Feb 23, 2002 at 05:07:34PM +,
Lee Harr <[EMAIL PROTECTED]> wrote:
> > How can I reset a sequence number back to 0 ?
> >
>
> SELECT setval('sequence_name', 0);
>
>
> In order for this to work, the sequence must have been created with
> a MINVALUE of 0 (the default MINVALUE is 1)
>
> How can I reset a sequence number back to 0 ?
>
SELECT setval('sequence_name', 0);
In order for this to work, the sequence must have been created with
a MINVALUE of 0 (the default MINVALUE is 1)
CREATE SEQUENCE sequence_name MINVALUE 0;
---(end of broadcast)---
Hello,
How can I reset a sequence number back to 0 ?
Regards
---(end of broadcast)---
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])