日期:2014-05-17  浏览次数:20495 次

在线等一个sql语句案例,谢谢
一个表有一列列名为destaddr,里面存了很多手机号码,可能有重复的手机号码,我要怎么才能查询出这些重复的手机号码?



小菜鸟先在这谢谢大牛了!

------解决方案--------------------
SQL code
select *  from tb where destaddr in (select destaddr from tb group by destaddr having count(1)>1)

------解决方案--------------------
select destaddr from tb group by destaddr having count(*)>1
------解决方案--------------------
探讨

引用:
SQL code

select * from tb exists (select destadd from tb group by destadd having count(1)>1)



我执行有语法错误!exists 报红线,我的数据库是sqlserver2000的