Ynt: get certain # of recs

From: Erol Öz <eroloz(at)esg(dot)com(dot)tr>
To: "Mike S(dot) Nowostawsky" <mikenowo(at)sympatico(dot)ca>, <pgsql-general(at)postgresql(dot)org>
Subject: Ynt: get certain # of recs
Date: 2001-09-14 22:41:43
Message-ID: 004201c13d6e$799cca60$0b00000a@doruk.www.doruk.net.tr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

select * from tablename limit 20;
-----Özgün İleti-----
Kimden: Mike S. Nowostawsky <mikenowo(at)sympatico(dot)ca>
Kime: pgsql-general(at)postgresql(dot)org <pgsql-general(at)postgresql(dot)org>
Tarih: 14 Eylül 2001 Cuma 23:58
Konu: [GENERAL] get certain # of recs

>How can one select only a certain number of records in Postgres?
>
>In other SQL langs we can use, say, for the first 20 recs:
>
>select * from tablename where rownum < 21;
>
>WHAT should 'rownum' be to make this select work... OR is there a diff
>syntax?
>
>Thx,
>--
>=============================================
> Mike S. Nowostawsky:
> Email: mikenowo(at)sympatico(dot)ca, mikenowo(at)yahoo(dot)ca
> Home Page: http://www3.sympatico.ca/mikenowo/
> Lachine (Montreal), Quebec, Canada
>
>
>
>---------------------------(end of broadcast)---------------------------
>TIP 3: if posting/reading through Usenet, please send an appropriate
>subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
>message can get through to the mailing list cleanly

Browse pgsql-general by date

  From Date Subject
Next Message Matthew Rice 2001-09-14 22:41:52 Re: Case sensitivity issue
Previous Message ljb 2001-09-14 22:37:20 Re: Strange select query