0

This is my SQL so far:

select * from table where table.json_info @> '{"search_tags":["hello", "world"]}'

And this works if the row has BOTH hello and world in the search_tags

I'm wondering if there is a way to include rows that have EITHER hello OR world and of course those that have both.

Thanks to all ahead of time!

1
  • 1
    select * from table where table.json_info @> '{"search_tags":["hello"]}' or '{"search_tags":[ "world"]}' Commented Aug 1, 2015 at 4:45

1 Answer 1

1

Thanks to @utility for putting me on the right track here.

This is what I wound up with:

select * from table where table.json_info @> '{"search_tags":["hello"]}' or table.json_info @> '{"search_tags":[ "world"]}'
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.