#### 13.7.7.7 SHOW CREATE EVENT 语句

```
SHOW CREATE EVENT event_name
```

该语句显示[`创建事件`](create-event.html)重新创建给定事件所需的语句。它需要[`事件`](privileges-provided.html#priv_event)要显示事件的数据库的权限。例如（使用相同的事件`电子日报`定义然后改变[第 13.7.7.18 节，“SHOW EVENTS 语句”](show-events.html)):

```
mysql> SHOW CREATE EVENT myschema.e_daily\G
*************************** 1. row ***************************
               Event: e_daily
            sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
                      NO_ZERO_IN_DATE,NO_ZERO_DATE,
                      ERROR_FOR_DIVISION_BY_ZERO,
                      NO_ENGINE_SUBSTITUTION
           time_zone: SYSTEM
        Create Event: CREATE DEFINER=`jon`@`ghidora` EVENT `e_daily`
                        ON SCHEDULE EVERY 1 DAY
                        STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
                        ON COMPLETION NOT PRESERVE
                        ENABLE
                        COMMENT 'Saves total number of sessions then
                                clears the table each day'
                        DO BEGIN
                          INSERT INTO site_activity.totals (time, total)
                            SELECT CURRENT_TIMESTAMP, COUNT(*)
                              FROM site_activity.sessions;
                          DELETE FROM site_activity.sessions;
                        END
character_set_client: utf8mb4
collation_connection: utf8mb4_0900_ai_ci
  Database Collation: utf8mb4_0900_ai_ci
```

`character_set_client`是会话值[`character_set_client`](server-system-variables.html#sysvar_character_set_client)创建事件时的系统变量。`collat​​ion_connection`是会话值[`collat​​ion_connection`](server-system-variables.html#sysvar_collation_connection)创建事件时的系统变量。`数据库整理`是与事件关联的数据库的排序规则。

输出反映事件的当前状态（`使能够`) 而不是创建它的状态。
