On 22-Dec-00 JCampbell wrote:
(get ready for it, big 21st century party is coming up)
> I want to know if it is possible to build a MySQL query which will only
> return the unique values of a specific column. Ie if I had this table:
>
> id | name |date_______
> 1 | Jon | 2001-01-03
> 2 | Bob | 2001-01-04
> 3 | Jon | 2001-01-05
>
> Is there any SQL query that will only return 1 row for each value in the
> name column, or would I have to do that in PHP?
>
'Jon' & 'Bob' are distinct elements; and then
Jon,2001-01-03
Bob,2001-01-04
Jon,2001-01-05
are also distinct elements.
You might be looking for a "group by", "distinct", or "left join ... is null"
What do you call 'unique' ?
Regards,
--
Don Read [EMAIL PROTECTED]
-- If you are going to sin, sin against God, not the bureaucracy.
God will forgive you but the bureaucrats won't.
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php