我收到了错误
Error(2,67): PLS-00049: bad bind variable OLD.DEPTNAME while executing below trigger
也在SQL开发人员中获得'输入绑定'提示
create or replace trigger emp_Dept_view_trig
instead of update on emp_Dept_view
for each row
begin
update department set LOCATION = :NEW.LOCATION where DEPTNAME:OLD.DEPTNAME;
commit;
end;
答案 0 :(得分:0)
CREATE OR REPLACE TRIGGER emp_Dept_view_trig
INSTEAD OF UPDATE
ON emp_Dept_view
FOR EACH ROW
BEGIN
UPDATE department
SET LOCATION = :NEW.LOCATION
WHERE DEPTNAME=:OLD.DEPTNAME;
commit; end;