I\'m trying to run NOT IN
select where NOT IN
list is dynamic. Something like
SELECT id, type FROM CONTACTS where type NOT IN (\'connec
You cannot place just one '?' instead of a list of values. As such, there is little to gain from trying to parametrize lists. One can, of course, create 2,4,16-value prepared statements ..." type NOT IN (?,?)", new String[]{ "connect","answer" },...
but even on a server with remote RDBMS it has questionable value.
Instead, do
db.query(TABLE, new String[] { "id", ""}, " type NOT IN ('connect','answer')",
null, null, null, null);
if the list is dynamic, you will have to escape the strings and put them into single quoted list.