Re: What's wrong about this sql statement?

From: Arne Weiner <aswr(at)gmx(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: What's wrong about this sql statement?
Date: 2001-08-31 11:46:42
Message-ID: 3B8F7922.334C9D20@gmx.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Corn wrote:

There is a comma missing. The Statement must be

CREATE TABLE usersright (
userid INTEGER NOT NULL,
rightid INTEGER NOT NULL,
allow BOOLEAN NOT NULL DEFAULT FALSE,
^^^^^^^
CONSTRAINT pk_usersright PRIMARY KEY (userid, rightid)
);

Tableconstraints mus be seperated by comma from coulmn definiftion.

Arne.

>
> I am newbie. Try to create a table like this.
>
> CREATE TABLE usersright (
> userid INTEGER NOT NULL,
> rightid INTEGER NOT NULL,
> allow BOOLEAN NOT NULL DEFAULT FALSE
> CONSTRAINT pk_usersright PRIMARY KEY (userid, rightid)
> );
>
> But I got the following error message:
>
> ERROR: parser: parse error at or near "("
>
> I am following the syntax of SQL statement reference from postgresql web
> site.
>
> please help.
>
> thx.
>
> corn

In response to

Browse pgsql-general by date

  From Date Subject
Next Message wsheldah 2001-08-31 12:41:48 Re: query help
Previous Message Corn 2001-08-31 07:58:45 What's wrong about this sql statement?