select t1.* from t1 a where 产品编号 in 
(select 产品编号 from t1 where 产品名称=a.产品名称 and 规格=a.规格)

解决方案 »

  1.   

    select 产品编号,产品名称,规格
    from 产品表 a
    where exists (select 1 from 产品表 where 产品编号<>a.产品编号
    and 产品名称=a.产品名称
    and 规格=a.规格)
      

  2.   

    select a.*
    from 产品表 a join (select 产品名称,规格 from 产品表 group by 产品名称,规格 having count(*)>1)b on (a.产品名称= b.产品名称 and a.规格=b.规格)