P
P
Pavel Gogolinsky2016-05-03 11:05:24
MySQL
Pavel Gogolinsky, 2016-05-03 11:05:24

How to formulate a query involving arrays?

The query is:
Select all records with columns PRODUCT ID, STORE ID and RESIDUE from the STOCK table where PRODUCT ID and STORE ID match the pairs from the array [ [1, 4], [2,10], [1,2], [5,1] ] .
How to formulate such a query in SQL?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
P
Pavel Gogolinsky, 2016-05-03
@gogolinsky

SELECT city FROM user WHERE (firstName, lastName) IN (('a', 'b'), ('c', 'd'));

S
shagguboy, 2016-05-03
@shagguboy

via union all

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question