OceanBase logo

OceanBase

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Resources

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS

OceanBase Cloud

OceanBase Database

Tools

Connectors and Middleware

QUICK START

OceanBase Cloud

OceanBase Database

BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Company

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

International - English
中国站 - 简体中文
日本 - 日本語
Sign In
Start on Cloud

A unified distributed database ready for your transactional, analytical, and AI workloads.

DEPLOY YOUR WAY

OceanBase Cloud

The best way to deploy and scale OceanBase

OceanBase Enterprise

Run and manage OceanBase on your infra

TRY OPEN SOURCE

OceanBase Community Edition

The free, open-source distributed database

OceanBase seekdb

Open source AI native search database

Customer Stories

Real-world success stories from enterprises across diverse industries.

View All
BY USE CASES

Mission-Critical Transactions

Global & Multicloud Application

Elastic Scaling for Peak Traffic

Real-time Analytics

Active Geo-redundancy

Database Consolidation

Comprehensive knowledge hub for OceanBase.

Blog

Live Demos

Training & Certification

Documentation

Official technical guides, tutorials, API references, and manuals for all OceanBase products.

View All
PRODUCTS
OceanBase CloudOceanBase Database
ToolsConnectors and Middleware
QUICK START
OceanBase CloudOceanBase Database
BEST PRACTICES

Practical guides for utilizing OceanBase more effectively and conveniently

Learn more about OceanBase – our company, partnerships, and trust and security initiatives.

About OceanBase

Partner

Trust Center

Contact Us

Start on Cloud
编组
All Products
    • Databases
    • iconOceanBase Database
    • iconOceanBase Cloud
    • iconOceanBase Tugraph
    • iconInteractive Tutorials
    • iconOceanBase Best Practices
    • Tools
    • iconOceanBase Cloud Platform
    • iconOceanBase Migration Service
    • iconOceanBase Developer Center
    • iconOceanBase Migration Assessment
    • iconOceanBase Admin Tool
    • iconOceanBase Loader and Dumper
    • iconOceanBase Deployer
    • iconKubernetes operator for OceanBase
    • iconOceanBase Diagnostic Tool
    • iconOceanBase Binlog Service
    • Connectors and Middleware
    • iconOceanBase Database Proxy
    • iconEmbedded SQL in C for OceanBase
    • iconOceanBase Call Interface
    • iconOceanBase Connector/C
    • iconOceanBase Connector/J
    • iconOceanBase Connector/ODBC
    • iconOceanBase Connector/NET
icon

OceanBase Database

SQL - V4.2.1

    Download PDF

    OceanBase logo

    The Unified Distributed Database for the AI Era.

    Follow Us
    Products
    OceanBase CloudOceanBase EnterpriseOceanBase Community EditionOceanBase seekdb
    Resources
    DocsBlogLive DemosTraining & Certification
    Company
    About OceanBaseTrust CenterLegalPartnerContact Us
    Follow Us

    © OceanBase 2026. All rights reserved

    Cloud Service AgreementPrivacy PolicySecurity
    Contact Us
    Document Feedback
    1. Documentation Center
    2. OceanBase Database
    3. SQL
    4. V4.2.1
    iconOceanBase Database
    SQL - V 4.2.1
    SQL
    KV
    • V 4.4.2
    • V 4.3.5
    • V 4.3.3
    • V 4.3.1
    • V 4.3.0
    • V 4.2.5
    • V 4.2.2
    • V 4.2.1
    • V 4.2.0
    • V 4.1.0
    • V 4.0.0
    • V 3.1.4 and earlier

    SHOW TRIGGERS

    Last Updated:2023-12-25 08:49:42  Updated
    share
    What is on this page
    share

    You can use the SHOW TRIGGERS statement to show the information about a trigger defined for a table in the database.

    The syntax is as follows:

    SHOW TRIGGERS
    [{FROM | IN} database_name]
    [LIKE 'pattern' | WHERE expr]
    

    The FROM clause specifies the database. If this clause is omitted, the default database is used. The SHOW TRIGGERS statement returns the information about triggers in only databases and tables that have the TRIGGER privilege.

    The LIKE clause (if any) specifies the names of the tables to match and shows the triggers of these tables. You can select rows by using the condition specified by the WHERE clause.

    The output of the SHOW TRIGGERS statement contains the following fields:

    • Trigger: the name of the trigger.

    • Event: the trigger event. It is the type of operation on the table that the trigger is associated with. The value can be INSERT (a row is inserted), DELETE (a row is deleted), or UPDATE (a row is modified).

    • Table: the table that the trigger is associated with.

    • Statement: the statement that is executed when the trigger fires.

    • Timing: specifies whether the trigger fires before or after the trigger event. Valid values: BEFORE and AFTER.

    • Created: the date and time when the trigger was created. The type of the value is TIMESTAMP(2) (with the fractional part in hundredth seconds).

    • sql_mode: the SQL mode used when the trigger was created.

    • Definer: the user that created the trigger, in the format of 'user_name'@'host_name'.

    • character_set_client: the value of the character_set_client system variable in the current session when the trigger was created.

    • collation_connection: the value of the collation_connection system variable when the trigger was created.

    • Database Collation: the collation of the database to which the trigger is associated.

    You can also obtain the information about a trigger from the INFORMATION_SCHEMA TRIGGERS table. For more information, see INFORMATION_SCHEMA TRIGGERS.

    Here is an example:

    obclient> SHOW TRIGGERS LIKE 'test_trg%'\G
    *************************** 1. row ***************************
    
                 Trigger: test_trg
                   Event: UPDATE
                   Table: test
               Statement: TRIGGER test_trg BEFORE UPDATE ON test
                          FOR EACH ROW
                          BEGIN
                          IF NEW.user_num < 1 THEN
                          SET NEW.user_num  = 1;
                          ELSEIF NEW.user_num > 45 THEN
                          SET NEW.user_num= 45;
                          END IF;
                          END
                  Timing: BEFORE
                 Created: 2022-05-18 18:07:51.994639
                sql_mode: STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE
                 Definer: 'root'@'%'
    character_set_client: utf8mb4
    collation_connection: utf8mb4
      Database Collation: utf8mb4
    

    Previous topic

    SHOW PROCEDURE STATUS
    Last

    Next topic

    INFORMATION_SCHEMA PARAMETERS
    Next