M
M
MdaUZH2016-08-23 07:56:38
SQL
MdaUZH, 2016-08-23 07:56:38

How to get several records with different id with one request?

Hello.
There is an id array:
String id[] = {4, 23, 43};
How to get data for these id with one query to the database?
or still have to do 3 calls?
Tell me please

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Maxim Fedorov, 2016-08-23
@MdaUZH

SELECT * FROM tablename WHERE id in (4, 23, 43)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question