I was wondering how do I update a table
with IN
in the WHERE
clause.
I can update it using =
operator but not sure how I should do it with IN
.
I tried to search a bit on google and SO but they seem to deal only with =
.
Can anyone please guide me to some link or post an answer how to do it.
This is how I tried it.
database.update("State_Regions",
cvs, "Country_ID IN ( ? ) AND State_ID IN ( ? ) AND Region_ID IN ( ? )",
new String[]{countryIDStr, stateIDStr, regionsIDStr});
The arguments are a comma separated list of integers like 1,2,3...
Thank you