1、查询表ddt中 name 字段重复值 select id from ddt A where exists ( select id from ddt B where B.name=A.name and B.ID<A.ID)