0

I am trying to figure out a way that I can search a column containing an array of integers. For example, column a -> [1,2]. Using another array, ex: b -> [1,2,3]

If all the values in a are in the array b, I want to return that result.

I've tried using unnest and = ANY but to no avail. Does anyone else have a solution to this?

1 Answer 1

3

You can use the "contains" operator @>

array[1,2,3] @> array[1,2]
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.