Resetting sequence number in PostgreSQL


While issuing the query TRUNCATE table TABLE_NAME works for MySQL for restarting the id of the table, this does not work with PostgreSQL.


In order to restart the sequence of the table in PostgreSQL you will have to issue the following:

from here