mysql 重复记录

# 查询重复的记录,查找id重复的记录
Select id,Count(*) From news Group By id Having Count(*) > 1

#查找某个分类下 有多少条记录
Select id,catid,Count(*) From product  where catid=180 Group By catid Having Count(*) > 0

猜你喜欢

转载自wyqjx.iteye.com/blog/2082545