Replies: 2 comments 4 replies
-
That's the only way I'm aware of. If there's a cleaner way, I'd love to know. If you have a large (> 500) number of ids, it may be faster to bulk-load them into a temp table and do a inner join, or to chunk through your ids array in batches of N (where N is large but doesn't bonk against any SQLite limits: https://www.sqlite.org/limits.html ) |
Beta Was this translation helpful? Give feedback.
-
There are many duplicates of this question, I personally use |
Beta Was this translation helpful? Give feedback.
-
Hello,
today I found my self needing to fetch data from a table based on an id, where I had a list of ids and in a single query I wanted the results.
I tried looking in the docs but I couldn't see any built-in method to do this "cleanly".
This is what I came up with:
Is there a better way to do this?
any input is welcome
thx
Rico
Beta Was this translation helpful? Give feedback.
All reactions