-
-
Notifications
You must be signed in to change notification settings - Fork 23
create_event_db.sql
Mark Rotteveel edited this page Jul 19, 2015
·
1 revision
CREATE TABLE CUSTOMER (
ID INTEGER NOT NULL PRIMARY KEY,
NAME VARCHAR(100) NOT NULL);
SET TERM !! ;
CREATE TRIGGER TRIG_ADD_CUSTOMER
FOR CUSTOMER
AFTER INSERT
AS
BEGIN
POST_EVENT 'CUSTOMER_INSERT';
END !!
CREATE TRIGGER TRIG_UPDATE_CUSTOMER
FOR CUSTOMER
AFTER UPDATE
AS
BEGIN
POST_EVENT 'CUSTOMER_UPDATE';
END !!
CREATE TRIGGER TRIG_DELETE_CUSTOMER
FOR CUSTOMER
AFTER DELETE
AS
BEGIN
POST_EVENT 'CUSTOMER_DELETE';
END !!
SET TERM ; !!