What is PostgreSQL equivalent to autoincrement?
Yes, SERIAL is the equivalent function. CREATE TABLE foo ( id SERIAL, bar varchar ); INSERT INTO foo (bar) VALUES (‘blah’); INSERT INTO foo (bar) VALUES (‘blah’); SELECT * FROM foo; +———-+ | 1 | blah | +———-+ | 2 | blah | +———-+ SERIAL is just a create table time macro around sequences. You … Read more