思路:
先找出每个emp_no中最小的id,若id不在最小id集合中则删除该记录。
delete from titles_test where id not in (select min(id) from titles_test group by emp_no);
delect from 表名 where 表达式。似乎不可以用group by等其他子句。
思路:
先找出每个emp_no中最小的id,若id不在最小id集合中则删除该记录。
delete from titles_test where id not in (select min(id) from titles_test group by emp_no);
delect from 表名 where 表达式。似乎不可以用group by等其他子句。