pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew Sullivan <ajs@crankycanuck.ca>
To: pgsql-sql@postgresql.org
Subject: Re: getting count for a specific querry
Date: Fri, 8 Apr 2005 12:30:39 -0400
Message-ID: <20050408163039.GE27718@phlogiston.dyndns.org> (raw)
In-Reply-To: <1112977065.7444.30.camel@localhost.localdomain>
References: <000001c53c3e$f4f5b730$797ba8c0@jfradkin>
	<20050408150731.GB27718@phlogiston.dyndns.org>
	<1112977065.7444.30.camel@localhost.localdomain>

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



view thread (38+ messages)  latest in thread

Message-ID: <20050408163039.GE27718@phlogiston.dyndns.org>
Permalink:  ../20050408163039.GE27718@phlogiston.dyndns.org/
Also on:    postgresql.org/message-id/20050408163039.GE27718@phlogiston.dyndns.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: ajs@crankycanuck.ca
  Subject: Re: getting count for a specific querry
  In-Reply-To: <20050408163039.GE27718@phlogiston.dyndns.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox