Re: IN clause

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: IN clause
Дата
Msg-id 20061124122010.GA11655@svana.org
обсуждение исходный текст
Ответ на Re: IN clause  ("surabhi.ahuja" <surabhi.ahuja@iiitb.ac.in>)
Ответы Re: IN clause  ("Brandon Aiken" <BAiken@winemantech.com>)
Список pgsql-general
On Fri, Nov 24, 2006 at 05:31:07PM +0530, surabhi.ahuja wrote:
> That is fine
> but what I was actually expecting is this
> if
> select * from table where col_name in (null, 'a', 'b');
>
> to return those rows where col_name is null or if it = a or if it is = b
>
> But i think in does not not support null queries , am i right?

You'll need to check the standard, but IN() treats NULL specially, I
think it returns NULL if any of the elements is null, or something like
that. It certainly doesn't work the way you think it does.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.

Вложения

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

Предыдущее
От: Alban Hertroys
Дата:
Сообщение: Re: IN clause
Следующее
От: Teodor Sigaev
Дата:
Сообщение: Re: tsearch to spellcheck