Re: Dates and NULL's`

Поиск
Список
Период
Сортировка
От Emi Lu
Тема Re: Dates and NULL's`
Дата
Msg-id 4DC99D22.5000004@encs.concordia.ca
обсуждение исходный текст
Ответ на Dates and NULL's`  (John Fabiani <johnf@jfcomputer.com>)
Список pgsql-sql
> if I have a date field that contains a NULL
> will it show up when I ask for a where date range for the same date field.
>
> Where mydate>= "2011/04/01"::date and mydate<= "2011/04/30"::date
>
> With the above where will the NULL's be selected????
>
> I ask because I was always told that a NULL matches everything and nothing!


I think the answer is no.

when mydate is null, record will not be returned.

e.g.,
select 'abc' where (null::date >='2011-01-01'::date) ;

0 rows returned.

Emi



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

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: Sorting Issue
Следующее
От: Brent Dombrowski
Дата:
Сообщение: Re: Dates and NULL's`