题解 | 二刷
删除emp_no重复的记录,只保留最小的id对应的记录。
https://www.nowcoder.com/practice/3d92551a6f6d4f1ebde272d20872cf05
/*delete from titles_test where titles_test.id not in ( select t.minid from ( select min(id) minid from titles_test group by emp_no ) as t ) */ /* #阅读理解,删除重复,对于重复的只保留最小id delete from titles_test where id not in (select min(t1.id) from( select * from titles_test ) as t1 group by t1.emp_no ) */ #阅读理解,删除重复,对于重复的只保留最小id delete from titles_test where id not in (select min(t1.id) from (select * from titles_test) as t1 group by t1.emp_no )