Re: [GENERAL] Row Count?

From: Thomas Reinke <reinke(at)e-softinc(dot)com>
To: Bruce Tong <zztong(at)laxmi(dot)ev(dot)net>
Cc: PostgreSQL General <pgsql-general(at)postgreSQL(dot)org>
Subject: Re: [GENERAL] Row Count?
Date: 1999-05-05 15:37:50
Message-ID: 373065CE.452F7D16@e-softinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Try
"select count(*) from row"

to get a count of the number of rows.

If trying to receive 10 rows, try

begin;
declare thomas cursor for select * from foo;
fetch 10 in thomas;
end;

Bruce Tong wrote:
>
> This is probably one of those things everyone knows except me, but my
> search of the documentation only turned up it's not a keyword in
> PostgreSQL...
>
> SELECT * FROM foo WHERE ROW_COUNT < 10;
>
> Is there anything like "ROW_COUNT" or "ROWCOUNT" in PostgreSQL?
>
> I've been looking through "The Practical SQL Handbook" as I know it is a
> significant influence on PostgreSQL, and I haven't found anything similar
> there either.
>
> Bruce Tong | Got me an office; I'm there late at night.
> Systems Programmer | Just send me e-mail, maybe I'll write.
> Electronic Vision / FITNE |
> zztong(at)laxmi(dot)ev(dot)net | -- Joe Walsh for the 21st Century

--
------------------------------------------------------------
Thomas Reinke Tel: (416) 460-7021
Director of Technology Fax: (416) 598-2319
E-Soft Inc. http://www.e-softinc.com

In response to

  • Row Count? at 1999-05-05 14:08:44 from Bruce Tong

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Bruce Tong 1999-05-05 15:39:02 Re: [GENERAL] Row Count?
Previous Message Michael Davis 1999-05-05 14:20:08 Re: [GENERAL] postgreSQL for storing a database of documents