On Oct 16, 2011, at 1:09 PM, Fabian wrote: > How can you limit a count-query? I tried: > > SELECT COUNT(*) FROM table LIMIT 5000 > > But it ignores the LIMIT clause.
No it doesn't, it works as advertised. You are falling into the same trap as you did just a couple of threads ago. You need to get a grip on that LIMIT construct :) The fine manual is there to help, please see "ORDER BY and LIMIT/OFFSET Clauses": http://www.sqlite.org/lang_select.html In the meantime: select count( * ) from ( select 1 from table limit 5000 ) _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users