How to limit result returned to 1 of each (MySQL+C#)
I am getting some data from the table in WinForms (MySQL Connector) and would like to know what type of MySQL statement I would need to use to limit each returned row to only 1 of its kind. For example, I have a table full of names and stuff, and I want to get a list of all first names, but there are many different rows that contain the same firstname, so how can I limit the query to only return 1 of each firstname?
Any hel开发者_JAVA百科p is appreciated.
Thank you
SELECT DISTINCT(first_name) FROM people
精彩评论