Closed OOHehir closed 1 year ago
You can use COUNT(*). Check https://github.com/iwongu/sqlite3pp/blob/master/test/testdb.cpp#L50
sqlite3pp::query qry(db, "SELECT COUNT(*) FROM contacts");
auto iter = qry.begin();
int count = (*iter).get<int>(0);
expect_eq(3, count);
Hello, I've taken a look at this & can't seem to find a decent answer.
Is there any suggested method to get the row count (i.e. length) of a table? I've tried using COUNT(*) without success & also something trivial like:
Thanks