您的位置:首页 > 技术中心 > 数据库 >

删除emp表的语句是什么

时间:2020-10-19 14:24

删除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表的语句是什么的详细内容,更多请关注gxlsystem.com其它相关文章!

热门排行

今日推荐

热门手游