in(NULL)

Поиск
Список
Период
Сортировка
От jose
Тема in(NULL)
Дата
Msg-id 3CEB9F3F.4080103@sferacarta.com
обсуждение исходный текст
Ответы Re: in(NULL)  ("Joel Burton" <joel@joelburton.com>)
Re: in(NULL)  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
Hi all,

I think I found a bug using the IN operator.


I have a table t populated as follow:
a  |  b
---+----
1  | 11
2  | 22
3  | 33
4  | NULL
(4 rows)
select * from t where b in (11,22,NULL);
a  |  b
---+----
1  | 11
2  | 22
(2 rows)
select * from t where b not in (11,22,NULL);
a  |  b
---+----
(0 rows)
-----------------------------------------------
I tried the same quesry in mysql and it give me
a different result. Who are right?
select * from t where b not in (11,22,NULL);
+---+---+
| a | b |
+---+---+
| 3 | 33|
+---+---+
1 row in set (0.00 sec)

please reply to jose@sferacarta.com
jose

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

Предыдущее
От: Mark J Hewitt
Дата:
Сообщение: JDBC driver changes for 1.4.0 JDK (pg 7.2.1)
Следующее
От: "krishna"
Дата:
Сообщение: Problem with Create Database