Description
noneTrigger properties
| name | value |
|---|
| name | JESSE.DO_NOT_DEL_SALES |
| base object type | |
| parent | STAFF |
| type | |
| event | |
| action type | |
| referencing names | |
| status | |
| description | |
Dependency graph
Objects that JESSE.DO_NOT_DEL_SALES depends on
| name | object type | level |
|---|
| STAFF | table | 1 |
Code
CREATE TRIGGER do_not_del_sales NO CASCADE BEFORE DELETE ON staff REFERENCING
OLD AS oldstaff FOR EACH ROW MODE DB2SQL WHEN(oldstaff.job = 'Sales') BEGIN
ATOMIC SIGNAL SQLSTATE '75000' ('Sales staff cannot be deleted... see the DO_NOT_DEL_SALES trigger.');
END;