with t as(
select min(id)
from titles_test
group by emp_no
) /*不能边查询边删除,需要先创建临时表*/
delete from titles_test
where id not in(select * from t); /*必须有分号
删除语句:
delete from tablename
where condition
*/

with t as(
select min(id)
from titles_test
group by emp_no
) /*不能边查询边删除,需要先创建临时表*/
delete from titles_test
where id not in(select * from t); /*必须有分号
删除语句:
delete from tablename
where condition
*/