Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

sequence postgresql

CREATE SEQUENCE seq_tipo MINVALUE 1;
ALTER TABLE tipo 
ALTER codt SET DEFAULT nextval('seq_tipo');

/*insert into YOUR_COLUMN_NAME VALUES (nextval('seq_tipo'), 'value_2')*/
Source by www.postgresqltutorial.com #
 
PREVIOUS NEXT
Tagged: #sequence #postgresql
ADD COMMENT
Topic
Name
5+6 =