0

Is it possible to use the questionmark (?) parameter together with WHERE x IN(y) when you want to replace "y" with an arbitrary number of parameters?

I've tried the following which not so surprisingly doesn't work:

String[] args = new String[]{"dude1, dude2"};
String query = "SELECT * FROM books WHERE author IN(?)";
db.rawQuery(query, args);

Is there a good way to do what I'm trying or am I forced to escape the args myself and concatenate them into the query string and not use ? or by generating a query string with the right number of ? depending on how many args I want?

nibarius
  • 4,007
  • 2
  • 38
  • 56

0 Answers0