HELP TRIGGER Examples | Teradata Vantage - HELP TRIGGER Examples - Advanced SQL Engine - Teradata Database

SQL Data Definition Language Syntax and Examples

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

Example: HELP TRIGGER for a Table Key

The following example reports the information for a trigger that updates a table key.

     HELP TRIGGER UpdateForKey;
     *** Help information returned. 1 row.
     *** Total elapsed time was 1 second.
             Name         UpdateForKey
             ----------   --------------
             ActionTime   B
    Decimal Order Value   10
     Creation TimeStamp   2003-02-12 15:55:02
                  Event   I
                   Kind   S
                Enabled   Y
                Comment   ?
         ValidTime Type   C
   TransactionTime Type   C

Example: HELP TRIGGER for a Bitemporal Table

Assume you have created the following row trigger definition for a bitemporal table.

     CREATE TRIGGER db1.trig_1 
       AFTER CURRENT VALIDTIME INSERT ON db1.table_1 
       REFERENCING NEW ROW AS NewRow_1 
       FOR EACH ROW 
       BEGIN ATOMIC
         (ABORT 'aborted' WHERE NewRow_1.c2 > 100;) 
       END;

A HELP TRIGGER request on this trigger reports the following information for trig1.

     HELP TRIGGER db1.trig1;
                        Name trig1
                   ActionTime A
          Decimal Order Value 32,767
           Creation TimeStamp 2010-12-09 23:11:57
                        Event I
                         Kind R
                      Enabled Y
                      Comment ?
               ValidTime Type C
         TransactionTime Type C