create table test( name varchar(10) not null, age tinyint not null )charset=utf8; insert into test values("张三",22),("张三",22),("李四",23),("王五",24); create temporary table tmp like test; insert into tmp select * from test group by test.name,test.age having count(*) = 1; drop table test; create table test like tmp; insert into test select * from tmp;