Jakub Chodounský

PostgreSQL Autoincrement


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

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


Show comments