From: | A James Lewis <james(at)vrtx(dot)net> |
---|---|
To: | Sergio <ser(at)perio(dot)unlp(dot)edu(dot)ar> |
Cc: | pgsql-interfaces(at)postgreSQL(dot)org |
Subject: | Re: [INTERFACES] limiting the rows selected in postgresql |
Date: | 1998-11-09 22:06:11 |
Message-ID: | Pine.LNX.3.93.981109220507.10626A-100000@vr1-workhorse1.vrtx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-interfaces |
I did this with:-
declare tmp cursor for select * from table;fetch forward 10 in tmp;
But if someone else has a better way, please let me know....
On Sat, 7 Nov 1998, Sergio wrote:
> Sferacarta Software <sferac(at)bo(dot)nettuno(dot)it> el da Mon, 9 Nov 1998 14:33:06
> +0100, escribi:
>
> >Hello Radhakrishnan,
> >
> >luned, 9 novembre 98, you wrote:
> >
> >
> >RCV> how can i limit the number of rows obtained from a select statement
> >RCV> in postgreSQL to say, 10 rows while the select condition actually
> >RCV> matches more than that. in oracle we can use the ROW_NUM variable
> >RCV> for this purpose but now i met such an issue with postgreSQL
> >
> >On v6.4 you can specify a limit for queries as:
> >
> >set QUERY_LIMIT TO '10';
> >To have only the first 10 rows from a select;
>
> this will limit _all_ the querys, right ?
> wich is not very flexible.
>
> I can't do something like
>
> select * from news order by news_date limit 10
>
> ?
>
> Sergio
>
>
James (james(at)linuxrocks(dot)co(dot)uk)
Vortex Internet
My Windows unders~1 long filena~1, and yours?
From | Date | Subject | |
---|---|---|---|
Next Message | Jose' Soares | 1998-11-10 10:12:03 | PL/pgSQL definition |
Previous Message | D'Arcy J.M. Cain | 1998-11-09 21:53:47 | Re: [HACKERS] Re: [COMMITTERS] 'pgsql/src/backend/lib stringinfo.c' |
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Reyes | 1998-11-10 02:58:10 | VisData & ODBC |
Previous Message | Oleg Bartunov | 1998-11-09 20:27:49 | Re: [INTERFACES] limiting the rows selected in postgresql |