Dear List,
Is there any way to force a query to return just a few records?
For ex, returning just the first ten rows from a long ORDER BY query ?
And then, eventually, obtaining the remaining records at a later time, or in
background?
Thanks in advance for your help,
Best,
Oliveiros
Hi Oliveiros
Certainly! What you're looking for is the LIMIT...OFFSET syntax.
Some examples:
SELECT ... LIMIT 10 - return the first 10 records only.
SELECT ... LIMIT 10 OFFSET 10 - return 10 records, starting with record 11.
Manual page:
http://www.postgresql.org/docs/8.3/interactive/queries
Thanks a million, Andy.
It's precisely what I needed, Indeed!
Best,
Oliveiros
- Original Message -
From: "Andy Shellam"
To: "Oliveiros Cristina"
Cc:
Sent: Monday, May 25, 2009 2:45 PM
Subject: Re: [SQL] Obtaining a limited number of records from a long query
Hi Oliveiros
Cert
On Mon, 25 May 2009 14:55:54 +0100
"Oliveiros Cristina" wrote:
>
>
> Thanks a million, Andy.
>
> It's precisely what I needed, Indeed!
Beware: unless you specify an ORDER BY (and you expect no other
record is inserted between one query and the other... or you just
don't care) you may incur in
Thank you for pointing it out, Ivan.
The query I am trying to restrict output for happens to be an ORDER BY
query.
Actually I wasn't aware of this detail.
I'll leave a mental note for myself that results might be unexpected for not
ORDER BY queries
Best,
Oliveiros
- Original Message
On Mon, 25 May 2009 15:20:57 +0100
"Oliveiros Cristina" wrote:
> Thank you for pointing it out, Ivan.
> The query I am trying to restrict output for happens to be an
> ORDER BY query.
> Actually I wasn't aware of this detail.
> I'll leave a mental note for myself that results might be
> unexpecte
Can somebody tell me please where i can find the PgAdmin Hotkey like
Ctrl+SPACEBAR and others??
Tanks for all.
--
John Evan Dizaro -
Fone: (41) -0303
Fone: (41) 9243-3240
Rua: Alferes Poli Curitiba - PR - Brasil