delete from emp where id in(
select id from (
Select id, sal,dense_rank() over (partition by sal order by id) as den
from emp
) t where t.den >1
)
select id from (
Select id, sal,dense_rank() over (partition by sal order by id) as den
from emp
) t where t.den >1
)
No comments:
Post a Comment