> "Chris" == Chris Wilson writes:
Chris> However, if we try to invert it by using the != operator, then
Chris> we get unexpected results:
Mr. De Morgan would like a word.
https://en.wikipedia.org/wiki/De_Morgan%27s_laws
In short, if you have a condition of the form (a OR b) and you want t
On Fri, Dec 7, 2018 at 5:21 AM Thomas Kellerer wrote:
> Thomas Kellerer schrieb am 07.12.2018 um 13:48:
> > Chris Wilson schrieb am 07.12.2018 um 13:39:
> >> However, if we try to invert it by using the != operator, then we get
> unexpected results:
> >>
> >> select * from foo where id NOT IN (1,
Thomas Kellerer schrieb am 07.12.2018 um 13:48:
> Chris Wilson schrieb am 07.12.2018 um 13:39:
>> However, if we try to invert it by using the != operator, then we get
>> unexpected results:
>>
>> select * from foo where id NOT IN (1, 2); /* returns row 3 only, as expected
>> */
>> select * from
Chris Wilson schrieb am 07.12.2018 um 13:39:
> However, if we try to invert it by using the != operator, then we get
> unexpected results:
>
> select * from foo where id NOT IN (1, 2); /* returns row 3 only, as expected
> */
> select * from foo where id != ANY (ARRAY[1, 2]); /* returns all rows,