> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-event.md).

# SHOW CREATE EVENT

## Syntax

```bnf
SHOW CREATE EVENT event_name
```

## Description

This statement displays the [CREATE EVENT](/docs/server/reference/sql-statements/data-definition/create/create-event.md) statement that creates a given [event](/docs/server/server-usage/triggers-events/event-scheduler/events.md), as well as the [SQL\_MODE](/docs/server/server-management/variables-and-modes/sql_mode.md) 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](/docs/server/reference/sql-statements/administrative-sql-statements/show/show-events.md).

{% tabs %}
{% tab title="Current" %}
`SHOW CREATE EVENT` quotes identifiers according to the value of the [sql\_quote\_show\_create](/docs/server/server-management/variables-and-modes/server-system-variables.md#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](/docs/server/server-management/variables-and-modes/server-system-variables.md#sql_quote_show_create) system variable. Note, however, that the output of this statement is unreliably affected by the [sql\_quote\_show\_create](/docs/server/server-management/variables-and-modes/server-system-variables.md#sql_quote_show_create) system variable.
{% endtab %}
{% endtabs %}

The [information\_schema.EVENTS](/docs/server/reference/system-tables/information-schema/information-schema-tables/information-schema-events-table.md) 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](/docs/server/server-usage/triggers-events/event-scheduler/events.md)
* [CREATE EVENT](/docs/server/reference/sql-statements/data-definition/create/create-event.md)
* [ALTER EVENT](/docs/server/server-usage/triggers-events/event-scheduler/alter-event.md)
* [DROP EVENT](/docs/server/reference/sql-statements/data-definition/drop/drop-event.md)

<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" %}
