删除emp表的语句是什么


本文摘自PHP中文网,作者藏色散人,侵删。

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

推荐:《oracle教程》

oracle数据库删除emp表

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

删除语句是:

1

2

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

commit;

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

1

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

以上就是删除emp表的语句是什么的详细内容,更多文章请关注木庄网络博客

相关阅读 >>

删除emp表的语句是什么

更多相关阅读请进入《emp》频道 >>


数据库系统概念 第6版
书籍

数据库系统概念 第6版

机械工业出版社

本书主要讲述了数据模型、基于对象的数据库和XML、数据存储和查询、事务管理、体系结构等方面的内容。



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...