创建过程 Oracle SQL 时出错
Error in creating procedure Oracle SQL
我想创建一个程序来删除具有最高 薪水 的 雇员。我有这个代码:
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;
但我收到以下错误:
Error(4,1): PL/SQL: SQL 语句被忽略。
Error(4,16): PL/SQL: Ora-00942 table 或视图不存在。
如何让它发挥作用?
看第 4 行:
delete from hr.Almalmazott2 where
您知道 table 您要删除的内容吗?这看起来像 table 列。
我想创建一个程序来删除具有最高 薪水 的 雇员。我有这个代码:
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;
但我收到以下错误: Error(4,1): PL/SQL: SQL 语句被忽略。 Error(4,16): PL/SQL: Ora-00942 table 或视图不存在。 如何让它发挥作用?
看第 4 行:
delete from hr.Almalmazott2 where
您知道 table 您要删除的内容吗?这看起来像 table 列。