方法一:

select * from  tablename  where  id   in   (select  id  from  tablename   group  by  id   having count(id) > 1 )

方法二:

 

select DISTINCT t.* from ( select*  from Goods g )  t