Re: [SQL] NULL
Bruce Stephens <bruce@cenderis.demon.co.uk>
From: Bruce Stephens <bruce@cenderis.demon.co.uk>
To: pgsql-sql@postgresql.org
Date: 1999-11-24T15:08:11Z
Lists: pgsql-sql
jose soares <jose@sferacarta.com> 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.