![]() I guess, if I use ASC or DESC in queries, I should add them to index. Following on from my earlier question here Case statement for Order By clause with Desc/Asc sort I have a statement like this: SELECT FROM TableName WHERE ORDER BY CASE OrderB圜olumn WHEN 1 THEN Forename END DESC, CASE OrderB圜olumn WHEN 2 THEN Surname END ASC. ![]() Where is info about how I should use them I cant find it. ![]() So, there are three options: no-sort, ASC, DESC when creating index. Int iRow2 = c.getColumnIndex(KEY_SCORE) //Cursor looking for column setting equal to these ints.įor (c.moveToFirst() !c.isAfterLast() c. Each column name or expression can be followed by one of the 'ASC' or 'DESC' keywords to indicate sort order. Third, use ASC option to sort the result set by the sort expression in ascending order and DESC to sort the result set by the sort expression in the descending. What is the most efficient method of showing my data in descending order? public String getRank() Ĭursor c = scoreDb.query(DATABASE_TABLE, score, null, null, null,null, null) //reading information from db. ASC DESC: The Second, You will be using the ASC or DESC to specify whether the values in the specified column should be sorted in descending or ascending. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |