"ANY (a, b) IN (expr)" - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

"ANY (a, b) IN (expr)"

netgertnetgert Posts: 331Member

I recently dug up some old projects and noticed that in many of those I had queries that had "a IN (expr1) OR b IN (expr1)" as a condition. Some of the time, the expression was a list of values passed via parameters, some of the time it was a SELECT expression. Most of the time the expression had potential to become computationally expensive. In few places, there were also variants where there were more than 2 columns being matched against a list of candidates (eg: a IN (...) OR b IN (...) OR c IN (...))

Somewhere between those projects and today I have given up the practice of manual query building and have turned to ORM solutions instead. However, seeking to continue improving my knowledge and skills in the field, I keep on searching for optimal solutions for both past and present problems.

Discuss which languages have which ways of representing the aforementioned problem
Sign In or Register to comment.