0

Hi guys,

I'm wondering if there is a way to solve this problem. Currently, I have an SQL statement that goes this way:

SELECT distinct name,id from list

My understanding is that it selects the things that are distinct on both tables.
Example:
id name
1 Joe
2 Joe


It will return to me the two rows because although the name is the same, the ids are not. Is there an SQL statement that will allow me to select a distinct name and still grab the id field? Basically I want to

SELECT distinct name from list

but grab the id too. In the previous example, it should just return 1 name with either of the ids.

2
Contributors
2
Replies
3
Views
6 Years
Discussion Span
Last Post by martin11ph
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.