PostgreSQL: Limit vs. Fetch First Rows with Ties
cybertec-postgresql.com
cybertec-postgresql.com
The only time I use a limit-clause is to paginate. On the other hand, if I wanted to make sure to get all rows whose column value was between 1 and 3, even if it would be more than 3 rows, then I would use a where-clause:
select * from table where id <= 3 order by id
not: select * from table order by id fetch first 3 rows with tiesThat is, the only use is not pagination as you claim. Regarding pagination, see https://blog.jooq.org/2014/08/06/join-the-no-offset-movement...