Karim Ouda's Technical Blog
The official technical Blog of Karim Ouda
Thursday, September 6, 2012
Counting the results of LIMITED SQLite query
If you try to run the following query to get the count of the results which might be less than 100
SELECT count(*) FROM TABLE LIMIT 100, 200
You will get the count of the full table - regardless of the limit
The solution
SELECT COUNT(*) FROM (SELECT * FROM TABLE LIMIT 100, 200 )
Tweet
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment