Received: from finch-post-12.mail.demon.net (finch-post-12.mail.demon.net [194.217.242.41]) by hub.org (8.9.3/8.9.3) with ESMTP id KAA63441 for ; Wed, 24 Nov 1999 10:08:10 -0500 (EST) (envelope-from bruce@cenderis.demon.co.uk) Received: from cenderis.demon.co.uk ([193.237.0.193]) by finch-post-12.mail.demon.net with esmtp (Exim 2.12 #1) id 11qe1c-000KPo-0C for pgsql-sql@postgresql.org; Wed, 24 Nov 1999 15:08:04 +0000 Received: by cenderis.demon.co.uk (Postfix, from userid 1000) id AB9862A585; Wed, 24 Nov 1999 15:08:11 +0000 (GMT) To: pgsql-sql@postgresql.org Subject: Re: [SQL] NULL References: <383059DA.9D2AF70D@kirra.net> <87u2mnttmt.fsf@cenderis.demon.co.uk> <38315E00.4CDB885F@sferacarta.com> From: Bruce Stephens Date: 24 Nov 1999 15:08:11 +0000 In-Reply-To: jose soares's message of "Tue, 16 Nov 1999 14:37:05 +0100" Message-ID: <87vh6sc4h0.fsf@cenderis.demon.co.uk> Lines: 21 User-Agent: Gnus/5.070098 (Pterodactyl Gnus v0.98) XEmacs/21.2 (Yoko) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii jose soares writes: > Bruce Stephens ha scritto: > > No, it's not required. This came up before with the examples from > > "The Practical SQL Handbook". It would be nice to allow it, but there > > was some reason why to do so would be non-trivial, which I forget. > > Anyway, it's not in SQL-92. > - According with SQL-92 every column can store a NULL value by default > unless one specify a NOT NULL constraint for the column. Yes. NULL would just mean that NULLs are permitted. So it's not required, obviously (since this is the default). However, many books recommend that you should generally not allow NULLs: thus, if you force yourself to explicitly say "NULL" or "NOT NULL", that ought to be a prompt to consider the issue (and you can spot cases which you may not have thought about by the absence of either). I imagine that's why "The Practical SQL Handbook" suggests it.