I have following SQL query -
SELECT * FROM users where id=X
Here 'X' is the set of values which need to be read from a file say ~/ids.lst. I have following approach in hand.
- Read ids.lst and load all variables.
- For each variable form and fire an SQL query and concat the results.
I have working code in python, but the problem is if I have n ids, then n queries will be made to server. Is there any way I could achieve the same with a single query to server?