表
A B Id
--------------------------------------
1 A 1
1 B 2
2 C 3
2 D 4
3 E 5
3 F 6
选择结果:
A B Id
--------------------------------------
1 A 1
2 C 3
3 E 5
SELECT *
FROM TEST
WHERE (ID IN
(SELECT MIN(id)
FROM TEST
GROUP BY A))
文章来源:http://jinweijie.blogspot.com/2006/10/codesql.html