16.20 - Example: Using TriggersV - Teradata Database - Teradata Vantage NewSQL Engine

Teradata Vantageā„¢ Data Dictionary

Product
Teradata Database
Teradata Vantage NewSQL Engine
Release Number
16.20
Published
March 2019
Language
English (United States)
Last Update
2019-05-03
dita:mapPath
zzu1512081120577.ditamap
dita:ditavalPath
TD_DBS_16_20_Update1.ditaval

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;