Re: restircting rows

From: Richard Huxton <dev(at)archonet(dot)com>
To: padmanabha konkodi <konkodi221(at)rediffmail(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: restircting rows
Date: 2006-02-22 09:18:27
Message-ID: 43FC2C63.8000006@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

padmanabha konkodi wrote:
>
>
> hi all,
>
> my query return 100 rows but if i am intrested only from 40-60 rows
> then how to restrict.
>
> for example
>
> select * from students (returns 100 rows).but i am intrested only
> rows from 40 to 60.

SELECT * FROM student ORDER BY something LIMIT 20 OFFSET 40;

Be aware that this will have to fetch 60 rows and throw the first 40 away.

--
Richard Huxton
Archonet Ltd

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message A. Kretschmer 2006-02-22 09:19:40 Re: restircting rows
Previous Message Markus Schaber 2006-02-22 09:17:26 Re: passing array(java) to postgre sql function