Auto incrementing id in POSTGRES
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,blah2,blah
http://stackoverflow.com/questions/787722/postgresql-autoincrement
Inga kommentarer:
Skicka en kommentar