Example: Using TriggersV - Advanced SQL Engine - Teradata Database

Data Dictionary

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
January 2021
Language
English (United States)
Last Update
2021-01-22
dita:mapPath
prb1610499325399.ditamap
dita:ditavalPath
hoy1596145193032.ditaval
dita:id
B035-1092
lifecycle
previous
Product Category
Teradata Vantageā„¢

The following SELECT returns this information:

  • Name of the database in which the triggering table is defined for those cases in which a trigger is defined in a different database than the triggering table
  • Names of the triggering tables
  • Names of the database in which the trigger is defined
  • Trigger names

This query identifies those triggers for which the trigger must be dropped if the database containing the triggering table is deleted.

SELECT SubjectTableDatabaseName, TableName, DatabaseName, TriggerName
   FROM TriggersV
   WHERE DatabaseName <> SubjectTableDatabaseName
   ORDER BY 1, 2, 3, 4;