From: | Michael Glaesemann <grzm(at)myrealbox(dot)com> |
---|---|
To: | Kumar S <ps_postgres(at)yahoo(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: create table error |
Date: | 2004-09-13 13:43:23 |
Message-ID: | E1A44C0F-058A-11D9-9715-000A95C88220@myrealbox.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
On Sep 13, 2004, at 10:35 PM, Kumar S wrote:
> create table contacts
> (
> con_id serial ,
> exp_id serial REFERENCES experiment,
> con_lname varchar(32) ,
> con_fname varchar(32) ,
> con_addressline varchar (64),
> con_zip varchar(16) ,
> );
> Is there some problem with these sql statements.
Yes. You have an extra comma following the line beginning con_zip. The
last line of the table definition should not be followed by a comma.
I suspect you're also going to have trouble with the exp_id serial
references experiment line. You probably don't want a default on a
column that needs to match a value in another table.
Hope that helps.
Also, please do not start a new thread by replying to a different
message. Create a new message instead.
Michael Glaesemann
grzm myrealbox com
From | Date | Subject | |
---|---|---|---|
Next Message | Devrim GUNDUZ | 2004-09-13 13:43:38 | Re: create table error |
Previous Message | Kumar S | 2004-09-13 13:35:02 | Re: create table error |