Need to show a SQLite query in descending order

前端 未结 4 1352
再見小時候
再見小時候 2020-12-20 12:26

I want to make a query such that the result will be shown in indistinct descending order.

For example, assume column ID has six rows. I need an quer

4条回答
  •  不知归路
    2020-12-20 12:47

    You can write like this:

    Cursor cursor = db.rawQuery("SELECT * FROM " + TABLE_NAME+" 
                    WHERE "+STATUS+" = "+"'0'" + " ORDER BY id DESC LIMIT 10", null);
    return cursor ;
    

提交回复
热议问题