I'm using PostgreSQL database on Rails 2.3.8 and I need to restart auto increment ID on my table. How can I do that?
If you truncate the table you can use the RESTART IDENTITY clause on the end.
Example:
TRUNCATE TABLE foo RESTART IDENTITY;
TRUNCATE DOCUMENTATION
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With