Q:

sql: how to select by two array

select * from table where columnA = ? and columnB = ?
the params are [[1, 'a'], [2, 'b'], [3, 'c']]
I want to get the result where columnA=1, columnB='a' and columnA=2, columnB='b' and columnA=3, columnB='c'
How can I achieve this in MySQL?

A:

OK,I just find the answer.
select * from table where (columnA, columnB) in ?
while the param should be ((1, 'a'), (2, 'b'), (3, 'c'), ...)
Thank you all.

