HomeMogDBMogDB StackUqbar
v5.0

Documentation:v5.0

Supported Versions:

Other Versions:

SHOW CREATE TRIGGER

Function

It returns the exact string that can be used to recreate the named trigger.

Precautions

sql_mode is the session value at the time of querying. B Database shows here the sql_mode bound at the time of creating the routine, and MogDB shows here the session value because MogDB does not bind the routine to sql_mode at the time of creating the routine.

character_set_client is client_encoding The session value of the system variable when the routine was created .

collation_connection is the value specified when lc_collate created the database.

Database Collation is the value specified when lc_collate created the database.

Syntax

SHOW CREATE TRIGGER trigger_name

Parameter Description

  • trigger_name

    The trigger name.

Examples

-- Query trigger creation statement.
MogDB=# show create trigger before_ins_stmt_trig;
       Trigger        |              sql_mode               |                                                        SQL Original Statement                          
                              | character_set_client | collation_connection | Database Collation 
----------------------+-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------
 before_ins_stmt_trig | sql_mode_strict,sql_mode_full_group | CREATE TRIGGER before_ins_stmt_trig BEFORE INSERT ON main_table FOR EACH STATEMENT EXECUTE PROCEDURE trigger_func('before_ins_stmt') | UTF8                 | en_US.UTF-8          | en_US.UTF-8
(1 row)
Copyright © 2011-2024 www.enmotech.com All rights reserved.