In the following example the column parents
is an array
of int
(parents INT[]
).
If I want to select all rows in which the array of parents
contains 42
, I can run this query:
SELECT * FROM records WHERE 42 = ANY (parents);
Now I want to do the opposite and select each row in which parents
does not contain 42
.
I tried this:
SELECT * FROM records WHERE 42 != ANY (parents);
without luck... Does anyone know how this can be done?
I'm using Postgresql 10.3
.