Dan Mertz Dan Mertz - 2 years ago 132
SQL Question

How to limit rows in PostgreSQL SELECT

What's the equivalent to SQL Server's TOP or DB2's FETCH FIRST or mySQL's LIMIT in PostgreSQL ?

Answer Source

You can use LIMIT just like in MySQL, for example:

SELECT * FROM users LIMIT 5;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download