Manish Marathe wrote:
of course, although DISTINCT(name) works

Yes, but writing it that way gives the impression that you are somehow "applying" DISTINCT only to the "name" column, which you're not. You're applying it to entire rows.

Oh, and can you please stop top-posting.

Jasper

On Fri, 2005-10-07 at 12:29 +1300, Jasper Bryant-Greene wrote:

Manish Marathe wrote:

SELECT DISTINCT(name), date, value FROM table_name ORDER BY date DESC;

DISTINCT is not a function. The above (if it even works) is exactly equivalent to:

SELECT DISTINCT name, date, value FROM table_name ORDER BY date DESC;

and will match distinct rows (that is, combinations of name, date and value).

--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/







--
Jasper Bryant-Greene
Freelance web developer
http://jasper.bryant-greene.name/

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to