Example documentationTRIGGERS Locate this document in the navigation structure

 

Use of the system table DOMAIN.TRIGGERS

Prerequisites

You can use the demo data for the SQL tutorial. Start the Database Studio as database administrator MONA with the password RED and log on to demo database DEMODB: Logging On to a Database.

Define triggers. Proceed as described in SQL Tutorial, Database Triggers.

Activities

You can use Database Studio to enter and execute SQL statements. More information: Working with SQL Statements: Overview

Note the General Instructions for formulating SQL statements.

You can use the system table TRIGGERS to determine the following database information, among other things:

  • UPDATE-Trigger for the table HOTEL

    SELECT triggername, definition

    FROM DOMAIN.TRIGGERS

    WHERE tablename = 'HOTEL'

    AND UPDATE = 'YES'

  • Table and action for which the trigger HOTEL_UPDATE was defined

    SELECT owner, triggername, insert, update, delete

    FROM DOMAIN.TRIGGERS

    WHERE triggername = 'HOTEL_UPDATE'