How to limit the number of rows returned by a Sqlite query

by

In MySQL, you can use “Limit <skip>,<count>”, like this:

select *
from sometable
order by name
limit 20,10

How to do in Sqlite?

You can still use “Limit <skip>,<count>”:

select *
from sometable
order by name
limit 20,10

or use equivalent query “Limit <count> offset <skip>”:

select *
from sometable
order by name
limit 10 offset 20

In Oracle: http://www.withdata.com/ad/oracle/how-to-limit-the-number-of-rows-returned-by-an-oracle-query-after-ordering.html .

In SQL Server: http://www.withdata.com/ad/sql-server/the-sql-server-equivalent-for-the-mysql-limit.html .

In DB2: http://www.withdata.com/ad/db2/the-db2-equivalent-for-the-mysql-limit.html .

In Mysql: http://www.withdata.com/ad/mysql/how-to-limit-the-number-of-rows-returned-by-an-mysql-query.html .

In PostgreSQL: http://www.withdata.com/ad/postgresql/how-to-limit-the-number-of-rows-returned-by-an-postgresql-query.html .

For more information, you can see this page: http://stackoverflow.com/questions/3325515/sqlite-limit-offset-query-doubt

Some SQLite tools you can try: https://www.withdata.com/sqlite/