Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

auto increment psql not primary key

CREATE SEQUENCE cateogry_id_seq;
ALTER TABLE category ALTER COLUMN category_id SET DEFAULT nextval('cateogry_id_seq');
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #auto #increment #psql #primary #key
ADD COMMENT
Topic
Name
8+3 =