postgresql - Restarting Primary Key -
here situation:
i have table gets truncated once week , new values placed in it.
what want do:
i want add primary key starts @ 1 , increases 1 each row in table gets inserted. when table gets truncated, want count start @ 1.
is possible?
use serial
column , use option restart identity
truncate table foo restart identity
http://www.postgresql.org/docs/current/static/sql-truncate.html
Comments
Post a Comment