query to return unique items
Hello,
I'm just learning SQL. I think this might be a very easy question, but I can't find out how to do it:
I'd like to do a query that would just return a list of unique items from a table. Here's an example.
The table might contain
FIELDS: id, name, comment
DATA:
1, Bob, Hi there
2, Bob, Goodbye
3, Norm, Howdy
4, Norm, See ya
5, Norm, Later
6, Annie, Greetings
What I'd like is a SELECT statement to return:
Bob
Norm
Annie
I know how to do this in PHP or on my client, but it seems to me that this would be better done on the server to reduce data volume.
Could someone either post a sample query or a hint or a link to a place where I could look it up?
Thanks!
Barrette