How to limit the number of rows returned by a PostgreSQL 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 PostgreSQL?

You’d use “Limit <count> offset <skip>”, like this:

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 Sqite: http://www.withdata.com/ad/sqlite/how-to-limit-the-number-of-rows-returned-by-an-sqlite-query.html .

Some PostgreSQL tools you can try: https://www.withdata.com/postgresql/