Created
August 27, 2015 10:06
-
-
Save oksep/6686194e0435f8cb71a7 to your computer and use it in GitHub Desktop.
Sqlite ,get table row count
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private long getTableRowCount(String tableName) { | |
String sql = "select count(*) from " + tableName; | |
SQLiteStatement statement = db.compileStatement(sql); | |
return statement.simpleQueryForLong(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment