2

Let's say I have several records with a column in type int[], and I want to find all the records containing at least one value greater than 200 in the array. How should I achieve that?

Sample data:

array
-------------
{18}
{489}
{218, 333, 100}
{23, 44, 102}

I would need to locate the second and third rows.

1 Answer 1

6
SELECT * FROM table1 WHERE 200 < ANY(arr);
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.