I have a table with column headings: | _id (long) | Name (String) | x (integer) | y (integer) |
I want to delete the row in the table that has Name myName.
depending on the complexity of your where condition, the "delete" method will not be the best solution.
for example, if you want to delete all records whose "_id" is in a second table, like you would write in transactSQL: "...WHERE _id IN (SELECT _id FROM..." then the best solution might be to use the ".execSQL()" method directly on your database.
myDatabase.execSQL("DELETE FROM myTable WHERE _id IN (SELECT _id FROM myOtherTable)");
or you could go real ugly and do something like:
int cursorRows = cursor.getCount();
String[] id2String = new String[cursorRows];
String id2StringUnique = "";
//for (int i=0;i
depending on number of items, you might have a problem with the length / size of your argument - besides it being diselegant to the extreme.