restircting rows
restircting rows
От:
"padmanabha konkodi" <konkodi221@rediffmail.com>
Дата:
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.
Re: restircting rows
От:
"A. Kretschmer" <andreas.kretschmer@schollglas.com>
Дата:
am 22.02.2006, um 9:06:57 -0000 mailte padmanabha konkodi folgendes: > > > 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 students limit 20 offset 40; HTH, Andreas -- Andreas Kretschmer (Kontakt: siehe Header) Heynitz: 035242/47215, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net=== Schollglas Unternehmensgruppe ===
Re: restircting rows
От:
Richard Huxton <dev@archonet.com>
Дата:
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
Re: restircting rows
От:
Michael Glaesemann <grzm@myrealbox.com>
Дата:
On Feb 22, 2006, at 18:06 , padmanabha konkodi wrote: > 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. See LIMIT and OFFSET. http://www.postgresql.org/docs/8.1/interactive/sql-select.html#SQL-LIMIT Michael Glaesemann grzm myrealbox com