Re: restircting rows - Mailing list pgsql-sql

From Richard Huxton
Subject Re: restircting rows
Date
Msg-id 43FC2C63.8000006@archonet.com
Whole thread Raw
In response to restircting rows  ("padmanabha konkodi" <konkodi221@rediffmail.com>)
List 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


pgsql-sql by date:

Previous
From: "A. Kretschmer"
Date:
Subject: Re: restircting rows
Next
From: Michael Glaesemann
Date:
Subject: Re: restircting rows