开发者

How to limit result returned to 1 of each (MySQL+C#)

开发者 https://www.devze.com 2023-02-08 12:17 出处:网络
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 exampl

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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号