1、select 表中重复的字段 from 表名 group by 表中的重复的字段 HAVING count(表中的重复的字段)>1
举例说明 :
表名 : psp_cell_model 重复的字段名:mp_no
select mp_no from psp_cell_model group by mp_no HAVING count(mp_no)>1;
举例2:
select * from psp_cell_model where mp_no in( select mp_no from psp_cell_mode group by mp_no HAVING count(mp_no)>1);
举例3:
select count(*) from psp_cell_model where mp_no in (select mp_no from psp_cell_model group by mp_no HAVING count(mp_no)>1);