postgresql reset auto_increment index
-- Change the starting value of the sequence
ALTER SEQUENCE project_id_seq RESTART 3000;
-- Same but dynamic :
SELECT SETVAL('project_id_seq', (SELECT MAX(id) + 1 FROM project));
postgresql reset auto_increment index
-- Change the starting value of the sequence
ALTER SEQUENCE project_id_seq RESTART 3000;
-- Same but dynamic :
SELECT SETVAL('project_id_seq', (SELECT MAX(id) + 1 FROM project));
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us