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

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Release Date
January 2021
Content Type
Programming Reference
Publication ID
B035-1144-175K
Language
English (United States)

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