Re: [GENERAL] NULL & NOT NULL

From: Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il>
To: Bill Sneed <bsneed(at)mint(dot)net>
Cc: pgsql-sql(at)postgreSQL(dot)org
Subject: Re: [GENERAL] NULL & NOT NULL
Date: 1998-12-08 14:46:51
Message-ID: l03110701b292eabaf844@[147.233.159.109]
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-sql

(redirected to the SQL list):

At 16:28 +0200 on 8/12/98, Bill Sneed wrote:

> The table creation works fine twith the NOT NULL but won't work with
> the NULL.
> NULL is supported isn't it? I can't see where I'm making a syntax
> error. Got me stumped. TIA.

The syntax is not supported. Columns allow nulls unless specified as NOT
NULL. So just drop the 'null' to achieve the same effect. In fact, this
NULL is not standard - here is the definition from SQL 1992:

<column definition> ::=
<column name> { <data type> | <domain name> }
[ <default clause> ]
[ <column constraint definition>... ]
[ <collate clause> ]

<column constraint definition> ::=
[ <constraint name definition> ]
<column constraint>
[ <constraint attributes> ]

<column constraint> ::=
NOT NULL
| <unique specification>
| <references specification>
| <check constraint definition>

As you can see, you can only write NOT NULL, not simply NULL.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dev_Al 1998-12-08 17:38:00 Participate in "Freedom 64-bit CPU" project (PostgreSQL CPU!!)
Previous Message Bill Sneed 1998-12-08 14:28:25 NULL & NOT NULL

Browse pgsql-sql by date

  From Date Subject
Next Message Dev_Al 1998-12-08 17:38:00 Participate in "Freedom 64-bit CPU" project (PostgreSQL CPU!!)
Previous Message Bill Sneed 1998-12-08 14:28:25 NULL & NOT NULL