Answers for "Reset auto increment after deleting a table row in postgresql"

SQL
1

postgresql reset auto increment

-- if you dont mind losing the data, do the following
TRUNCATE TABLE someTable RESTART IDENTITY;
Posted by: Guest on January-15-2021
1

postgresql update auto_increment value

ALTER SEQUENCE product_id_seq RESTART WITH 1453
Posted by: Guest on March-20-2020

Code answers related to "Reset auto increment after deleting a table row in postgresql"

Code answers related to "SQL"

Browse Popular Code Answers by Language