All pages
Powered by GitBook
1 of 1

Loading...

SHOW CREATE EVENT

Get the SQL statement to recreate a scheduled event. This statement displays the complete syntax used to define a specific event.

Syntax

Description

This statement displays the CREATE EVENT statement that creates a given event, as well as the 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 CREATE EVENT quotes identifiers according to the value of the system variable.

SHOW CREATE EVENT quotes identifiers according to the value of the system variable. Note, however, that the output of this statement is unreliably affected by the system variable.

The table provides similar, but more complete, information.

Examples

See also

This page is licensed: GPLv2, originally from

SHOW CREATE EVENT event_name
SHOW EVENTS
sql_quote_show_create
sql_quote_show_create
sql_quote_show_create
information_schema.EVENTS
Events Overview
CREATE EVENT
ALTER EVENT
DROP EVENT
fill_help_tables.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