删除emp表的语句是什么

删除emp表的语句是什么,第1张

删除emp表的语句是什么

删除emp表的语句是“delete from emp where (deptno,sal) in (select deptno,max(sal) from emp group by deptno);commit;”。

推荐:《oracle教程》

oracle数据库删除emp表

从emp表中删除各个部门中具有最高工资的员工。

删除语句是:

delete from emp where (deptno,sal) in (select deptno,max(sal) from emp group by deptno);
commit;

避免删错,执行删除 *** 作前先select确认一下:

select * from emp where (deptno,sal) in (select deptno,max(sal) from emp group by deptno);

以上就是删除emp表的语句是什么的详细内容,

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/sjk/704838.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-04-23
下一篇 2022-04-23

发表评论

登录后才能评论

评论列表(0条)

保存