Thursday, September 19, 2013

SQL IN operator for multiple columns from different tables

SQL IN operator for multiple columns from different tables

I have an oracle 11.2 database and need the following query:
SELECT * FROM table1 a, table2 b
WHERE a.id = b.a_id AND (a.a_col1, b.b_col1) in ((?, ?), (?, ?), (?, ?))
Please note, that the values don't matter, I am interested in the
structure of such a query. I am going to execute the query from java,
passing parameters.

No comments:

Post a Comment