Re: getting count for a specific querry - Mailing list pgsql-sql

From Andrew Sullivan
Subject Re: getting count for a specific querry
Date
Msg-id 20050408163039.GE27718@phlogiston.dyndns.org
Whole thread Raw
In response to Re: getting count for a specific querry  (Ragnar Hafstað <gnari@simnet.is>)
Responses Re: getting count for a specific querry
List 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@crankycanuck.ca
When my information changes, I alter my conclusions.  What do you do sir?    --attr. John Maynard Keynes


pgsql-sql by date:

Previous
From: Ragnar Hafstað
Date:
Subject: Re: getting count for a specific querry
Next
From: Tom Lane
Date:
Subject: Re: getting count for a specific querry