select count of distinct rows

From: Havasvölgyi Ottó <h(dot)otto(at)freemail(dot)hu>
To: <pgsql-sql(at)postgresql(dot)org>
Subject: select count of distinct rows
Date: 2005-12-11 00:53:40
Message-ID: 003001c5fded$53a2c5a0$0200a8c0@OTTO
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hi,

I would like to select the count of distinct rows in a table.

SELECT COUNT(DISTINCT *) FROM mytable;

This does not work. How can I do it with Postgres?

Thanks,
Otto

In response to

  • unsubscribe at 2005-12-09 05:37:41 from Dinesh Pandey

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Jaime Casanova 2005-12-11 00:57:10 Re: select count of distinct rows
Previous Message Leif B. Kristensen 2005-12-10 10:07:44 Re: Error from trigger