SHOW CREATE EVENT

This MySQL statement displays an SQL statement that can be used to create an event like the one given.

Syntax

Below is the syntax for this command. Text within square brackets (i.e, [ and ] ) are optional. Choices are separated by bars (i.e, | ). Ellipses preceded by a comma indicates a repeating pattern. Ellipses before or after syntax are used to highlight a relevant except from the larger syntax. Text displayed in italic letters represent text that should be replaced with the specific names related to the database (e.g., column with the name of the column).

SHOW CREATE EVENT event

Explanation

This MySQL statement displays an SQL statement that can be used to create an event like the one given. It's mostly useful for displaying any comments associated with the event, because they're not included in the results of the SHOW EVENTS statement.

Examples

An example of this MySQL statement follows showing an event that was created with the CREATE EVENT statement:

SHOW CREATE EVENT students_copy G

*************************** 1. row ***************************
       Event: students_copy
    sql_mode:
Create Event: CREATE EVENT `students_copy` ON SCHEDULE
EVERY 1 DAY ON COMPLETION PRESERVE ENABLE
COMMENT 'Daily copy of students table to students_backup'
DO CALL students_copy_proc()