Database reference - SAMPLE

SAMPLE -  triggers -  JESSE.DO_NOT_DEL_SALES

Description

none

Trigger properties

namevalue
nameJESSE.DO_NOT_DEL_SALES
base object type
parentSTAFF
type
event
action type
referencing names
status
description

Dependency graph

STAFFDO_NOT_DEL_SALES

Objects that JESSE.DO_NOT_DEL_SALES depends on

nameobject typelevel
STAFFtable1

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;



Documentation generated by SqlSpec