select a.* from test a where exists(select 1 from test where 省份编号!=a.省份编号 and 号段=a.号段)

解决方案 »

  1.   

    select [号段]
    from test
    group by [号段]
    having count(1) > 1
      

  2.   

    declare @sql table (a int ,b int )
    insert @sql
    select 1352525,2 union all
    select 1352521,4 union all
    select 1352522,5 union all
    select 1352523,2 union all
    select 1352525,7 
    select * from @sqlselect * from @sql where a in (select a from @sql group by a having count(1)>1)
      

  3.   

    libin_ftsafe(子陌红尘:当libin告别ftsafe)  正解
      

  4.   

    select * from tablename
    group by 号段
    having count(号段) > =2