I query certain tables of an sqlite database:
public Cursor showAllTables(){
String mySql = " SELECT name FROM sqlite_master " + " WHERE type='table' "
+ " AND name LIKE 'PR_%' ORDER BY name";
return ourDatabase.rawQuery(mySql, null);
}
I get this result:
- Chevrolet
- Ferrari
- Maserati
- bugatti
- hyundai
How can I have the list ordered independently of the first letter being capital or not?
You’ll need to add
COLLATE NOCASEto the end of your query:Or you could recreate the table and add
COLLATE NOCASEto the column definition.