Using Triggers - Advanced SQL Engine - Teradata Database

Database Introduction

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
17.00
Published
June 2020
Language
English (United States)
Last Update
2021-01-23
dita:mapPath
qia1556235689628.ditamap
dita:ditavalPath
lze1555437562152.ditaval
dita:id
B035-1091
lifecycle
previous
Product Category
Teradata Vantageā„¢

You can use triggers to do various things:

  • Define a trigger on the subject table to ensure that the UPDATE, INSERT, MERGE, and DELETE statements performed to the subject table are propagated to another table.
  • Use triggers for auditing. For example, you can define a trigger which causes the INSERT statements in a log table when an employee receives a raise higher than 10%.
  • Use a trigger to disallow massive UPDATE, INSERT, MERGE, or DELETE during business hours.
  • Use a trigger to set a threshold. For example, you can use triggers to set thresholds for inventory of each item by store, to create a purchase order when the inventory drops below a threshold, or to change a price if the daily volume does not meet expectations.
  • Use a trigger to call SQL stored procedures and external stored procedures.