how add limit clause to manageQuery on android

前端 未结 5 1891
没有蜡笔的小新
没有蜡笔的小新 2021-02-10 03:00

Android\'s API provides a clean mechanism via SQLite to make queries into the contact list. However, I am not sure how to limit the results:

Cursor cur = ((Acti         


        
5条回答
  •  再見小時候
    2021-02-10 03:18

    You are accessing a ContentProvider, not SQLite, when you query the Contacts ContentProvider. The ContentProvider interface does not support a LIMIT clause directly.

    If you are directly accessing a SQLite database of your own, use the rawQuery() method on SQLiteDatabase and add a LIMIT clause.

提交回复
热议问题