How do i order my SQLITE database in descending order, for an android app?

后端 未结 11 1703
死守一世寂寞
死守一世寂寞 2020-11-27 16:44

What is the most efficient method of showing my data in descending order?

public String getRank() {

    String[] rank = new String[]{ KEY_ROWID };
    Curso         


        
11条回答
  •  星月不相逢
    2020-11-27 17:30

    Cursor c = myDB.rawQuery("SELECT distinct p_name,p_price FROM products order by Id desc",new String[]{});
    

    this works for me!!!

提交回复
热议问题