Jakub Chodounský

PostgreSQL Autoincrement

CREATE SEQUENCE tablename_col_seq;
 
ALTER TABLE tablename
    ALTER columname set default nextval('tablename_col_seq');

Thank you for reading! Did you like the article? Send me a comment.


Would you like to get top 5 links on Programming every Monday?
Sign up to Programming Digest and stay up to date!