我正在尝试通过在触发器下方写入对 wokson_staff 表执行一些约束,但出现以下错误:
PLS-00103:在预期以下之一时遇到符号“选择”:
(-+case mpd mew mot null............)
谁能帮我弄清楚我的触发器出了什么问题?
谢谢
Create or replace trigger Emp_cons
Before Insert on WorksON_Staff
For each row
begin
where exists( SELECT worksON_staff.AssignmentNo, worksON_staff.StaffNo,
staff.stafftype
FROM worksON_Staff,staff,workassignment
WHERE worksON.assignmentNo=worksON_staff.assignmentNo
and staff.staffNo=worksON_staff.staffNo
and
staff.stafftype ='supervisor'
INTERSECT
SELECT worksON_staff.AssignmentNo, worksON_staff.StaffNo,staff.stafftype
FROM worksON_Staff,staff,workassignment
WHERE
worksON.assignmentNo=worksON_staff.assignmentNo
and staff.staffNo=worksON_staff.staffNo
and
staff.stafftype ='authorizer')
Then raise_error('71001', 'blahblablah');
end Emp_cons;