From: Gunnar R|nning <gunnar@candleweb.no>
To: Cary O'Brien <cobrien@Radix.Net>
Cc: mikeo@spectrumtelecorp.com
Cc: pgsql-general@hub.org
Subject: Re: Re: [SQL] oracle rownum equivalent?
Date: 08 Jun 2000 15:13:23 +0200
Message-ID: <x6vgzk1fkc.fsf@thor.candleweb.no> (raw)
References: <200006081245.IAA05207@saltmine.radix.net>
"Cary O'Brien" <cobrien@Radix.Net> writes:
> Arrg. That's what I get for emailing late at night without checking
> (my Oracle book is in the office). Where I typed rownum I meant
> rowid. You are 100% correct about rownum. You can use rownum for
> things like
>
> select * from foo where rownum <= 20
>
> Where in postgresql you would say
>
> select * from foo limit 20
Related question: A typical web search interface needs a page based
browsing system where you can list the 10 next matches. Is it possible to
do this in PostgreSQL without retrieving all the rows up to your current
page. I'm thinking of something like :
select * from foo where <some search criteria> and
rownum >= 30 and rownum < 40
Or is this where I should look into using cursors to access
the result set ?
Regards,
Gunnar
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-sql@postgresql.org
Cc: gunnar@candleweb.no, cobrien@Radix.Net, mikeo@spectrumtelecorp.com, pgsql-general@hub.org
Subject: Re: [SQL] oracle rownum equivalent?
In-Reply-To: <x6vgzk1fkc.fsf@thor.candleweb.no>
References: <200006081245.IAA05207@saltmine.radix.net> <x6vgzk1fkc.fsf@thor.candleweb.no>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox