Mysql(Mariadb)之展示触发器创建信息SHOW CREATE TRIGGER(英文)

SHOW CREATE TRIGGER

Syntax

SHOW CREATE TRIGGER trigger_name

Contents

  1. Syntax
  2. Description
  3. Examples
  4. See also

Description

This statement shows a CREATE TRIGGER statement that creates the given trigger, as well as the SQL_MODE that was used when the trigger has been created and the character set used by the connection.

The output of this statement is unreliably affected by the sql_quote_show_create server system variable - see http://bugs.mysql.com/bug.php?id=12719

Examples

SHOW CREATE TRIGGER example\G
*************************** 1. row ***************************
               Trigger: example
              sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,STRICT_ALL_TABLES
,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_
ENGINE_SUBSTITUTION
SQL Original Statement: CREATE DEFINER=`root`@`localhost` TRIGGER example BEFORE
 INSERT ON t FOR EACH ROW
BEGIN
        SET NEW.c = NEW.c * 2;
END
  character_set_client: cp850
  collation_connection: cp850_general_ci
  Database Collation: utf8_general_ci
  Created: 2016-09-29 13:53:34.35

MariaDB starting with 10.2.3

The Created column was added in MySQL 5.7 and MariaDB 10.2.3 as part of introducing multiple trigger events per action.

原文地址:https://mariadb.com/kb/en/show-create-trigger/


欢迎加我们微信wang1415035017进入微信高级技术群共同进步,或者扫码加入我们哦(V_V) 

你可能感兴趣的:(mysql,mysql,mariadb,trigger,show,create,触发器)