PostgreSQL Autoincrement

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

Would you like to get the most interesting content about programming every Monday?
Sign up to Programming Digest and stay up to date!