In recent versions, you can do "select count(distinct theCol) ..." (I'm
actually running one at this moment!!)
On Mon, 2002-03-04 at 09:34, Rob wrote:
> Given a table with some non-unique column theCol, what is the most efficient
> way to count the number of different values in theCol? I guess
Rob wrote :
>
> Given a table with some non-unique column theCol, what is the most efficient
> way to count the number of different values in theCol? I guess you can use a
> temporary table as a subselect:
>
> CREATE TEMPORARY TABLE tmp SELECT UNIQUE theCol FROM theTable;
> SELECT COUNT(*) FROM
Given a table with some non-unique column theCol, what is the most efficient
way to count the number of different values in theCol? I guess you can use a
temporary table as a subselect:
CREATE TEMPORARY TABLE tmp SELECT UNIQUE theCol FROM theTable;
SELECT COUNT(*) FROM tmp;
DROP TABLE tmp;
But t