O'Reilly logo

Tera-Tom's 1000 Page e-Book on Teradata Architecture and SQL, 2nd Edition by Tom Coffing, William Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Chapter 37 - Trigger Functions

“Ideas pull the trigger, but instinct loads the gun.”

-Don Maquis

The Fundamentals of Triggers

1. A Trigger is an Event driven maintenance operation (Object Type ‘G’)

2. The event is caused (Trigger Fired) by one or more modifications to a table

3. The Original Modification, the TRIGGER, and all subsequent triggers constitute a Single Transaction

4. The SQL and all Triggers associated must each work or all are Rolled Back

5. The user's initial SQL maintenance request that causes a row to change in a table and then causes a trigger to fire (execute) can be: INSERT, UPDATE, DELETE or INSERT/SELECT (SELECT will NOT work to fire a Trigger)

6. Once a Trigger fires, it can perform SQL such as INSERT, UPDATE, DELETE, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required