【发布时间】:2016-11-23 23:22:29
【问题描述】:
我想创建一个程序,删除 salary 最高的 员工。我有这个代码:
create or replace procedure DelMostExpensive
as
begin
delete from hr.Employees where
hr.Employees.EmpName=
(select EmpName from hr.Employees where
salary = (select max(salary) from hr.Employees))
and hr.Employees.birthDate=
(select birthDate from hr.Employees where
salary = (select max(salary) from hr.Employees));
end;
但我收到以下错误: 错误 (4,1): PL/SQL: SQL 语句被忽略。 错误(4,16):PL/SQL:Ora-00942 表或视图不存在。 如何让它发挥作用?
【问题讨论】:
标签: stored-procedures oracle-sqldeveloper