常用的有两种方法,第一种就是select distinct name from table。但是有时候我们要返回多个字段时就用第二种方法select *, count(distinct name) from table group by name