WHERE IN clause in Android sqlite?

前端 未结 7 1737
無奈伤痛
無奈伤痛 2020-12-31 09:18

I can\'t get WHERE IN clause to work on android SQLite database.

Is there any way to execute a statement like this in android? :

SELECT body FROM ta         


        
7条回答
  •  感动是毒
    2020-12-31 09:23

    Another way of doing this

    Cursor mCursor = SQLiteDatabase.query(true, "Name of table","String array of selection columns","title  in ('title1', 'title2', 'title3')", null, null, null, null, null);
    if (mCursor != null) {
        mCursor.moveToFirst();
    }
    

提交回复
热议问题