在查找数据的时候会出现重复的内容,如商品会有好多件,而商品名称是相同的,为了避免查询出现多条记录,可以使用以下语句: 1、select *,count(distinct name) from 表名 group by name; 2、select * from 表名 group by name; 语句1,查询结果中会增加count(distinct name)一列,语句2不会出现。