create table

From: LeoDeBeo <leodebeo(at)hotmail(dot)com>
To: pgsql-sql(at)postgresql(dot)org
Subject: create table
Date: 2001-04-29 19:34:29
Message-ID: 9chqd9$21vm$2@news.tht.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

can anybody explain me the syntax of Create Table documentation??

CREATE [ TEMPORARY | TEMP ] TABLE table (
column type
[ NULL | NOT NULL ] [ UNIQUE ] [ DEFAULT value ]
[ column_constraint_clause | PRIMARY KEY } [ ... ] ]
[ , ... ]
[ , PRIMARY KEY ( column [, ... ] ) ]
[ , CHECK (condition) ]
[ , table_constraint_clause ]
) [ INHERITS ( inherited_table [, ... ] ) ]

i don't understand what the curly brace means after PRIMARY KEY (where is
the other matching brace? ). It must have something to do with the fact
that a 'column type' pair ( with options ) can occur more than once, but is
this syntax right?
i also don't understand what the [ ... ] and [, ... ] means. I do know that
brackets denote options and | alternatives.

tx

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Martín Marqués 2001-04-30 09:25:39 views and rules on update
Previous Message Eliel Mamousette 2001-04-29 17:08:02 SQL Server -> Postgres migration: Stored Procedure replacement?