Re: select count of distinct rows
От | Foster, Stephen |
---|---|
Тема | Re: select count of distinct rows |
Дата | |
Msg-id | 005d01c5fdf2$21d1fcd0$2101a8c0@cfgod обсуждение исходный текст |
Ответ на | Re: select count of distinct rows (Jaime Casanova <systemguards@gmail.com>) |
Список | pgsql-sql |
Well, I find the problem on my end. I was working with a new database that I forgot to filler yet. Yes, it works. Jaime, I think what he is trying to do is get the record count. I would agree that using that statement is a bit much. But using SELECT COUNT(*) FROM mytable; would give the same thing and should run faster. -----Original Message----- From: pgsql-sql-owner@postgresql.org [mailto:pgsql-sql-owner@postgresql.org] On Behalf Of Jaime Casanova Sent: Saturday, December 10, 2005 7:13 PM To: Foster, Stephen Cc: Havasvölgyi Ottó; pgsql-sql@postgresql.org Subject: Re: [SQL] select count of distinct rows On 12/10/05, Foster, Stephen <stephenlfoster@comcast.net> wrote: > Well this should work but I tried it and it didn't. > > SELECT DISTINCT COUNT(*) FROM mytable; > No, it shouldn't work... actually is a non-sense, count will return just one value so there is nothing to be distinct with... -- regards, Jaime Casanova (DBA: DataBase Aniquilator ;) ---------------------------(end of broadcast)--------------------------- TIP 5: don't forget to increase your free space map settings -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 12/9/2005 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 12/9/2005
В списке pgsql-sql по дате отправления: