Mailinglisten-Archive |
Markus Dobel wrote:
> SELECT COUNT(DISTINCT MasterID) FROM All_Reports;
> SELECT COUNT(DISTINCT MasterID FROM All_Reports);
http://www.tcx.se/Manual_chapter/manual_Reference.html#Group_by_functions
COUNT(DISTINCT expr,[expr...])
Returns a count of the number of different values.
mysql> select COUNT(DISTINCT results) from student;
In MySQL you can get the number of distinct expressions
combinations by giving a list of expressions.
In ANSI SQL you would have to do a concatenation of
all expressions inside CODE(DISTINCT ..).
---
Was sagt denn "SELECT VERSION() as v" bei Dir?
Kristian
--
Kristian Köhntopp, NetUSE Kommunikationstechnologie GmbH
Siemenswall, D-24107 Kiel, Germany, +49 431 386 436 00
Using PHP3? See our web development library at
http://phplib.netuse.de/ (We have moved! Update your bookmarks!)
php::bar PHP Wiki - Listenarchive