Re: select count of distinct rows

From: Jaime Casanova <systemguards(at)gmail(dot)com>
To: Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: select count of distinct rows
Date: 2005-12-11 00:57:10
Message-ID: c2d9e70e0512101657o50263342ma1769631b3a67133@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On 12/10/05, Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu> wrote:
> Hi,
>
> I would like to select the count of distinct rows in a table.
>
> SELECT COUNT(DISTINCT *) FROM mytable;
>

are really all the fields distincts? the table doesn't have a pk?

> This does not work. How can I do it with Postgres?
>
> Thanks,
> Otto
>

--
regards,
Jaime Casanova
(DBA: DataBase Aniquilator ;)

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Havasvölgyi Ottó 2005-12-11 01:07:00 Re: select count of distinct rows
Previous Message Havasvölgyi Ottó 2005-12-11 00:53:40 select count of distinct rows