delete from titles_test where
emp_no in

    (select emp_no from (
        select emp_no from titles_test 
        group by emp_no having count(1)>1)a)

先筛选出emp_no有重复的数据
and
id not in

(select id from(
    select min(id) as id from titles_test 
    group by emp_no having count(1)>1)b)

再筛选出emp_no重复数据中ID最小的