select distinct sano,said from [table]

解决方案 »

  1.   


    select * from 表 a
    where exists( select * from 表 where Sano=a.Sano and said<>a.said)
      

  2.   


    select *
    from tablename
    where sano in (  select sano 
                     from tablename
                     group by sano
                     having count(distinct said)>1
                  )  
      

  3.   

    其实是这样的,sano与said本来应该是n:1的关系,即一个sano只对应一个said,但一个said可以对应多个sano。但由于操作的错误,导致产生了一些记录一个sano对应多个said了。现在希望找出这些记录来。
      

  4.   

    支持 zjcxc(邹建) !!!!应该可以
      

  5.   

    应用表的自连接:
    select a.*
    from table a , table b
    where a.sano=b.sano and a.said<>b.said