- I have a array column in postgress table
- I have list of values
Want to skip all the rows which have any of the value from my list
Id Subjects
1 [English, SST]
2 [Science, Maths]
3 [Hindi, Sanskrit]
Want to select rows where subject does not conatin any of [English, hindi, sanskrit] hence outpur should be only id = 2
2
Answers
Having
Then
With the array operator overlaps (elements in common).
Fiddle
The comparison should be either
if NULL arrays (subjects or list) should be treated as unknown,
or
if NULL arrays should be treated as an empty array.
The first option returns NULL if either, or both, subjects and list are NULL.