select a.* from 表 a,表 b where a.sage=b.sage and a.saddress=b.saddress

解决方案 »

  1.   

    select 
        t.Sname 
    from 
        S t 
    where 
        exists(select 
                   1 
               from 
                   S 
               where 
                   Sage=t.Sage 
                   and 
                   Saddress=t.Saddress 
                   and 
                   Sname!=t.Sname)
      

  2.   

    select sname from S as a
    where exists(
     select Sage,Saddress from S 
     where Sage=a.Sage and Saddress=a.Sage
     group by Sage,Saddress
     having count(1)>1 
     )