Re: create table error

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: create table error
Дата
Msg-id E1A44C0F-058A-11D9-9715-000A95C88220@myrealbox.com
обсуждение исходный текст
Ответ на Re: create table error  (Kumar S <ps_postgres@yahoo.com>)
Список 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


В списке pgsql-novice по дате отправления:

Предыдущее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: create table error
Следующее
От: Betsy Barker
Дата:
Сообщение: LockAcquire: lock table 1 is out of memory