Re: select count(*); - Mailing list pgsql-general

From Geoff Winkless
Subject Re: select count(*);
Date
Msg-id CAEzk6fd4K_-QaKXGoS5ZADNsWMSbXg4YRqUma3t0XfHQrXPBqw@mail.gmail.com
Whole thread Raw
In response to Re: select count(*);  (Marc Mamin <M.Mamin@intershop.de>)
Responses Re: select count(*);  (Yves Dorfsman <yves@zioup.com>)
List pgsql-general
On 11 June 2015 at 15:17, Marc Mamin <M.Mamin@intershop.de> wrote:
>But COUNT(*)
>
>does have meaning - it means "the number of rows".

which rows? :-)
 
​The number of rows in the query, as well you know :)

The reason you can't SELECT *; is because there's no way of defining what "*" refers to in this instance. You don't need to define what (*) is in order to tell that there's exactly one row in it.

Geoff

pgsql-general by date:

Previous
From: Asma Riyaz
Date:
Subject: GCC error and libmpfr.so.4 not found
Next
From: Tom Lane
Date:
Subject: Re: select count(*);