Android SQLlite排序简单查询

时间:2020-12-30 23:03:55

Maybe someone can help me before i lose my mind. I want to sort a SQL database.

在我失去理智之前,也许有人可以帮助我。我想对SQL数据库进行排序。

SQLiteDatabase db = getWritableDatabase();
db.query(TABLE_NAME, new String[]{COLUM_MAME_1, COLUM_MAME_2, COLUM_MAME_3}, null, null, null, null, COLUM_MAME_3 + " ASC");

Q: db.query... manipulates or should manipulate the database? Cause I get no error and nothing happens to the database. If not? is there a simple way to do it?

问:db.query ...操纵或应该操纵数据库?因为我没有错误,数据库没有任何反应。如果不?有一个简单的方法吗?

Roland

罗兰

1 个解决方案

#1


0  

In relational databases, tables do not have a guaranteed order.

在关系数据库中,表没有保证的顺序。

To view the rows in a specific order, you must sort them whenever you are querying them.

要按特定顺序查看行,必须在查询时对它们进行排序。

#1


0  

In relational databases, tables do not have a guaranteed order.

在关系数据库中,表没有保证的顺序。

To view the rows in a specific order, you must sort them whenever you are querying them.

要按特定顺序查看行,必须在查询时对它们进行排序。