Is there a way to write a single query to check if a rowset matches a row of values? I have one row for a set of values ββthat I need to map, and I would like to know if all rows match or not. I could accomplish this with a few queries, such as:
select * from tableName where (value1, value2) = ('someValue1', 'someValue2')
select * from tableName where (value1, value2) = ('someOtherValue1', 'someOtherValue2')
... etc., up to an arbitrary number of requests. How can this be rewritten as a single query when the query is returned ONLY if all values ββmatch?
source
share