# SHOW CREATE EVENT

## Syntax

```sql
SHOW CREATE EVENT event_name
```

## Description

This statement displays the [CREATE EVENT](https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-event) statement that creates a given [event](https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/events), as well as the [SQL\_MODE](https://mariadb.com/docs/server/server-management/variables-and-modes/sql_mode) that was used when the trigger was created, and the character set used by the connection. To find out which events are present, use [SHOW EVENTS](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-events).

{% tabs %}
{% tab title="Current" %}
`SHOW CREATE EVENT` quotes identifiers according to the value of the [sql\_quote\_show\_create](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#sql_quote_show_create) system variable.
{% endtab %}

{% tab title="< 10.6.5 / 10.5.13 / 10.4.22" %}
`SHOW CREATE EVENT` quotes identifiers according to the value of the [sql\_quote\_show\_create](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#sql_quote_show_create) system variable. Note, however, that the output of this statement is unreliably affected by the [sql\_quote\_show\_create](https://mariadb.com/docs/server/server-management/variables-and-modes/server-system-variables#sql_quote_show_create) system variable.
{% endtab %}
{% endtabs %}

The [information\_schema.EVENTS](https://mariadb.com/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-events-table) table provides similar, but more complete, information.

## Examples

```sql
SHOW CREATE EVENT test.e_daily\G
*************************** 1. row ***************************
               Event: e_daily
            sql_mode: 
           time_zone: SYSTEM
        Create Event: CREATE 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: latin1
collation_connection: latin1_swedish_ci
  Database Collation: latin1_swedish_ci
```

## See also

* [Events Overview](https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/events)
* [CREATE EVENT](https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-event)
* [ALTER EVENT](https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/alter-event)
* [DROP EVENT](https://mariadb.com/docs/server/reference/sql-statements/data-definition/drop/drop-event)

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
