日期:2014-05-20  浏览次数:20642 次

怎样查询一张表里面的某个字段是否有重复值
怎样查询一张表里面的某个字段是否有重复值

------解决方案--------------------
for example
SQL code
select count(1), your_field from your_table
 group by your_field having count(1) > 1

------解决方案--------------------
SQL code

 select count(字段),money from 表明 group by 字段 having coun
t(字段) >1;

select count(money),money from t_financialinfo group by money having coun
t(money) >1;