select * from user a where exists
(select 1 from user where a.username=fmail or username=a.fmail)
or
(select 1 from user where a.hometel=tel or hometel=a.tel)

解决方案 »

  1.   

    select * from user a where exists
    (select 1 from user where a.username=fmail or username=a.fmail)
    or
    (select 1 from user where a.hometel=ftel or hometel=a.ftel)
      

  2.   

    select *
    from user
    where (username,fmail,mmail) in (select username,fmail,mmail from user group by username,fmail,mmail having count(*)>1)
      

  3.   

    http://www.cnblogs.com/consatan/archive/2010/12/17/1909087.html
    前几天刚写的文章