sql查出表中重复的所有的记录
---查出表中重复的所有的记录
select * from TB_PRODUCT_CATEGORY
where pc_name
in (
select pc_name from TB_PRODUCT_CATEGORY
group by pc_name,pc_parent_id
having count(pc_id) > 1
--这里一定要having count(字段)>数值
)
---查出表中重复的所有的记录
select * from TB_PRODUCT_CATEGORY
where pc_name
in (
select pc_name from TB_PRODUCT_CATEGORY
group by pc_name,pc_parent_id
having count(pc_id) > 1
--这里一定要having count(字段)>数值
)