17.05 - CREATE TRIGGERおよびREPLACE TRIGGER構文 - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQLデータ定義言語 構文規則および例

Product
Advanced SQL Engine
Teradata Database
Release Number
17.05
Published
2021年1月
Content Type
プログラミング リファレンス
Publication ID
B035-1144-175K-JPN
Language
日本語
Last Update
2021-03-30
{ CREATE | REPLACE } TRIGGER [ database_name_1. ] trigger_name
  [ ENABLED | DISABLED ]
  { BEFORE | AFTER } [ temporal_option ] triggering_event
  ON [ database_name_2. ] table_name
  [ ORDER integer ]
  REFERENCING reference [...]
  [ FOR EACH { ROW | STATEMENT } ]
  [ WHEN ( search_condition ) ]
  { trigger_action | BEGIN ATOMIC trigger_action END } [;]
triggering_event
{ INSERT | 
  DELETE |
  UPDATE [ OF { column_name [,...] | ( column_name [,...] ) } ]
}
reference
{ OLD [ ROW ] [AS] old_transition_variable_name |
  NEW [ ROW ] [AS] new_transition_variable_name |
  { OLD_TABLE | OLD TABLE } [AS] old_transition_table_name |
  { NEW_TABLE | NEW TABLE } [AS] new_transition_table_name |
  OLD_NEW_TABLE [AS] old_new_table_name ( old_value, new_value )
}
trigger_action
{ SQL_procedure_statement [;...] |
  ( SQL_procedure_statement [;...] )
}