get certain # of recs

From: "Mike S(dot) Nowostawsky" <mikenowo(at)sympatico(dot)ca>
To: pgsql-general(at)postgresql(dot)org
Subject: get certain # of recs
Date: 2001-09-14 03:44:29
Message-ID: C_eo7.29408$2r.2992264@news20.bellglobal.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Justin Clift 2001-09-14 04:54:24 Re: business perspective
Previous Message Matthew O. Persico 2001-09-14 02:27:25 Re: General database programming question