Back to Home

Triggers Documentation

Currently our triggers allow us to track any database changes when an UPDATE or an INSERT occurs for a table. Changes are only for select CEM and QUAD tables.

Definition: a special type of stored procedure that automatically runs when an event occurs in the database server. DML triggers run when a user tries to modify data through a data manipulation language (DML) event. DML events are INSERT, UPDATE, OR DELETE statements on a table or a view.

Table of Contents

Trigger

SQLTrigger.PNG

Change History Table

The following table will save all UPDATE or INSERT data when a database change is made.

Tables with Triggers

The following tables UPDATE or INSERT changes will be tracked in the smart.sam_ChangeHistory table.

Trigger Scripts

A cursor is used to loop through a table to detect any changes via UPDATE or INSERT and saves the data to the smart.sam_ChangeHistory table.