I am working on android project. I used sqlite database for it. I have tables in database. I have created databasehelper class. i want to count number of records in particul
This would be more efficient:
int numRows = DatabaseUtils.longForQuery(db, "SELECT COUNT(*) FROM table_name", null);
Or:
int numRows = DatabaseUtils.queryNumEntries(db, "table_name");