Re: [SQL] How to autoincrement a primary key...

2006-09-22 Thread Aarni Ruuhimäki
On Saturday 23 September 2006 01:12, Thomas Kellerer wrote: > Richard Broersma Jr wrote on 22.09.2006 21:25: > >> I am sure this is simple, but I don't get it. I am new to PGSQL, coming > >> from MySQL - in mysql, you can autoincrement the primary key; in > >> postgre, I am not sure how to do this.

Re: [SQL] How to autoincrement a primary key...

2006-09-22 Thread Thomas Kellerer
Richard Broersma Jr wrote on 22.09.2006 21:25: I am sure this is simple, but I don't get it. I am new to PGSQL, coming from MySQL - in mysql, you can autoincrement the primary key; in postgre, I am not sure how to do this. I have read the documentation, and tried "nextval" as the default - I have

Re: [SQL] How to autoincrement a primary key...

2006-09-22 Thread Andrew Chilton
On 23/09/06, Richard Broersma Jr <[EMAIL PROTECTED]> wrote: Is just shorthand notation for: CREATE SEQUENCE foo START 1; CREATE TABLE bar (id integer PRIMARY KEY DEFAULT nextval('bar')); Doug, just a slight typo correction in that second line Richard gave you (bar should be foo), it should rea

Re: [SQL] How to autoincrement a primary key...

2006-09-22 Thread Richard Broersma Jr
> I am sure this is simple, but I don't get it. I am new to PGSQL, coming from > MySQL - in mysql, you can autoincrement the primary key; in postgre, I am > not sure how to do this. I have read the documentation, and tried "nextval" > as the default - I have searched for the datatype SERIAL, but I

[SQL] How to autoincrement a primary key...

2006-09-22 Thread Doug Hyde
I am sure this is simple, but I don't get it. I am new to PGSQL, coming from MySQL - in mysql, you can autoincrement the primary key; in postgre, I am not sure how to do this. I have read the documentation, and tried "nextval" as the default - I have searched for the datatype SERIAL, but I am using