在我的其中一列中,有重复的内容,我只想抓取第一个匹配项。我怎样才能做到这一点?在这个例子中,我想抓住一切都在山坳C.独特的行,所以我只想hello ladies
,hello team
,hello cats
和hello sexy
MySQL:排除重复数据
Example Table
---------------
column A | col B | col C
--------------------------
hello | ladies| 1
hello | guys | 1
hello | team | 2
hello | dogs | 2
hello | cats | 3
hello | cats | 3
hello | sexy | 4
等待,如果我想选择所有列,这将如何工作?这不是说我必须输入每一个而不是使用'*'吗?我试过这个:'SELECT DISTINCT col C,* FROM table' – Strawberry 2011-04-01 07:06:30
http://jan.kneschke.de/projects/mysql/groupwise-max/ – Isotopp 2011-04-03 11:48:47