Using String[] selectionArgs in SQLiteDatabase.query()
Solution 1:
selectionArgs replace any question marks in the selection string.
for example:
String[] args = { "first string", "[email protected]" };
Cursor cursor = db.query("TABLE_NAME", null, "name=? AND email=?", args, null);
as for your question - you can use null
Solution 2:
Yes, you may set all parameters to null except the table name.
for example:
Cursor cursor = db.query("TABLE_NAME", null, null, null, null, null, null);