having

1.如何只显示重复数据,或不显示重复数据
   显示重复:select * from tablename group by id having count(*)>1
   不显示重复:select * from tablename group by id having count(*)=1

猜你喜欢

转载自zengshaotao.iteye.com/blog/2017158