MySQL的去重

1.distinct去重

去掉所有相同字段

2.group_concat函数

select id,group_concat(price separator ';') from goods group by id;  

3.聚合函数加count

在select中使用count(distinct 字段)

posted @ 2020-08-10 16:30  年少而为  阅读(307)  评论(0编辑  收藏  举报