Re: [INTERFACES] selectecting not null varchars.

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [INTERFACES] selectecting not null varchars.
Дата
Msg-id 23137.951431026@sss.pgh.pa.us
обсуждение исходный текст
Ответ на selectecting not null varchars.  (Joseph Shraibman <jks@p1.selectacast.net>)
Список pgsql-interfaces
Joseph Shraibman <jks@p1.selectacast.net> writes:
> select * from directory where h != null AND length(h) > 0 ;

The correct, SQL92-approved spelling for this condition is
WHERE h IS NOT NULL AND ...

We also accept the abbreviation "h NOTNULL", although that's not a
standard AFAIK.  And of course you could do "NOT(h IS NULL)".

Certain Microsoft products that have difficulty grasping the concept of
NULL allow you to write these conditions with "=" or "!=", but in fact
any ordinary comparison operator should yield NULL out if either input
is NULL, so Microsoft is violating the letter and spirit of the spec by
accepting that.
        regards, tom lane


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

Предыдущее
От: Joseph Shraibman
Дата:
Сообщение: Re: [INTERFACES] selectecting not null varchars.
Следующее
От: Ed Loehr
Дата:
Сообщение: Re: [INTERFACES] selectecting not null varchars.