在我的特殊情况下,我需要打印出薪水超过100'000的每位员工的'emp_id'和'薪水'。它只需要检查然后打印出来。
CREAT OR REPLACE TRIGGER idNumber
BEFORE
CREATE OR REPLACE TRIGGER salary_trigger
AFTER INSERT or UPDATE OF salary, ON Employee
for each row
WHEN (salary > 100000)
DECLARE
BEGIN
if salary > 100000
THEN
DBMS_OUT.PUT_LINE(salary, emp_id);
END;
/
答案 0 :(得分:0)
为何触发?当然只是
select emp_id, salary
from Employee
where salary > 100000;
会吗?