1. select count(ziduan1) from table group by ziduan1 having count(zidian1)>1
 上面的语句你用1,和2都试一下,可以看到效果的

解决方案 »

  1.   

    select * from [yourtable] where ziduan1 in
    (select ziduan1 from [yourtable] group by ziduan1 having count(ziduan1)>1)
      

  2.   

    1。select * from [yourtable] where ziduan1 in
    (select ziduan1 from [yourtable] group by ziduan1 having count(ziduan1)>1)
    2。select * from [yourtable] where ziduan2 in
    (select ziduan2 from [yourtable] group by ziduan1 having count(ziduan2)>1)
      

  3.   

    select * from [yourtable] where ziduan1 in
    (select ziduan1 from [yourtable] group by ziduan1 having count(ziduan1)>1)
    --having 子句