Re: [SQL] NULL

Поиск
Список
Период
Сортировка
От Bruce Stephens
Тема Re: [SQL] NULL
Дата
Msg-id 87vh6sc4h0.fsf@cenderis.demon.co.uk
обсуждение исходный текст
Ответ на NULL  (Goran Thyni <goran@kirra.net>)
Список 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.


В списке pgsql-sql по дате отправления:

Предыдущее
От: neko@kredit.sth.szif.hu
Дата:
Сообщение: Re: [SQL] Info on SQL Parsing required
Следующее
От: Julien Cadiou
Дата:
Сообщение: recursive