Re: getting count for a specific querry

From: Andrew Sullivan <ajs(at)crankycanuck(dot)ca>
To: pgsql-sql(at)postgresql(dot)org
Subject: Re: getting count for a specific querry
Date: 2005-04-08 16:30:39
Message-ID: 20050408163039.GE27718@phlogiston.dyndns.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Fri, Apr 08, 2005 at 04:17:45PM +0000, Ragnar Hafstað wrote:
> On Fri, 2005-04-08 at 11:07 -0400, Andrew Sullivan wrote:
> >
> > SELECT count(*) FROM tablename WHERE condition LIMIT n;

> the LIMIT clause limits the number of rows returned by the select,
> in this case 1 row.
>
> maybe you mean something like:
>
> test=# select count(*) from (select * from a limit 2) as foo;

Yes, that was stupid of me. That's what I meant, though.

A

--
Andrew Sullivan | ajs(at)crankycanuck(dot)ca
When my information changes, I alter my conclusions. What do you do sir?
--attr. John Maynard Keynes

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Tom Lane 2005-04-08 16:32:03 Re: getting count for a specific querry
Previous Message Ragnar Hafstað 2005-04-08 16:25:46 Re: getting count for a specific querry