Re: Use of the LIMIT clause ?

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Richard Bayet <bayet(at)enseirb(dot)fr>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Use of the LIMIT clause ?
Date: 2001-03-12 22:25:24
Message-ID: Pine.BSF.4.21.0103121421400.97339-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql


IIRC, the postgres syntax uses limit and offset for what rows to get
(ie LIMIT 1 OFFSET 10)

On Mon, 12 Mar 2001, Richard Bayet wrote:

> I read on a website dedicated to MySQL, that the limit clause allows
> someone to restrict the result of a query to a certain domain.
> Exemple : "select id, title from movie order by id limit 3" -> only the
> (here, first) 3 lines of the table
> I did knew about this, but the author goes further about the "limit
> N,P", which allows someone to get only results between the Nth and Pth
> lines of the whole result...
> I tried this with psql, but couldn't get anything but parse errors.
> However, "\h select" does mention "LIMIT [count, all] {offset, START}"
> So, is it possible or not ? And what's the correct syntax ?

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Tom Lane 2001-03-12 22:53:24 Re: Strange behavior with timestamps
Previous Message Stefan Huber 2001-03-12 21:53:00 Re: Compiling error... plz hlp

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-03-12 22:49:05 Re: help
Previous Message Michael Fork 2001-03-12 21:08:28 Re: I need an aggregate with 2 parameters