There is no guarantee that it always gets the correct result.
For example, we insert 10 records and then delete 2 of them.
If the 2 records does not hold the maximum id, the result is not correct.
From: jesuscheung
To:
if your table's primary key is auto incremented, try:
select max(id) from table
this will be faster than using count()
--
View this message in context:
http://www.nabble.com/How-to-get-the-total-row-number-of-a-table-by-Sqlite-more-efficient%EF%BC%9F-tp20061797p21359430.html
Sent from the
"yokk y" <[EMAIL PROTECTED]> wrote in
message
news:[EMAIL PROTECTED]
>I want to get the total rows of a table, here are my methods:
>
> Is there some more efficient methods or API interface with
> Sqlite?Because my program invoke this interface very frequency.
If it's really that
3 matches
Mail list logo