Re: SELECT WHERE NOT, is not working

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: SELECT WHERE NOT, is not working
Дата
Msg-id 1879.1104965085@sss.pgh.pa.us
обсуждение исходный текст
Ответ на SELECT WHERE NOT, is not working  (MargaretGillon@chromalloy.com)
Список pgsql-general
MargaretGillon@chromalloy.com writes:
> I have a small table in which I have a Character(1) field called reengine.
> The field either has an "X" or is empty. This field does not have NULL
> values. There are 27 records in the table, 25 are marked with an 'X' in
> reengine.

> When I write
> select count(*) from resource where reengine = 'X';
> the result is 25

> when I write
> select count(*) from resource where NOT (reengine = 'X');
> the result is zero even though there are two records without the 'X'.

I don't think I believe your statement that those records don't have
NULL values.

            regards, tom lane

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

Предыдущее
От: MargaretGillon@chromalloy.com
Дата:
Сообщение: Re: SELECT WHERE NOT, is not working
Следующее
От: Steve Crawford
Дата:
Сообщение: Re: SELECT WHERE NOT, is not working