求取字段内重复值的SQL记录

SELECT d.* FROM lot_team d 

WHERE d.id NOT IN (select max(t.id) from  lot_team t GROUP BY t.team_name)

你可能感兴趣的:(求取字段内重复值的SQL记录)