Reputation: 1640
MySQL Events
I have a server with existing events.
I know how to list them, but I don't know what they do.
is there a way to see the event script of existing events?
Either in cli
or in the Workbench
.
Upvotes: 5
Views: 15038
Reputation: 1
You can show the CREATE EVENT statement with the SQL below. *The doc explains the SQL below and \G can show it more clearly and you must select a database when showing the CREATE EVENT
statement otherwise there is the error:
SHOW CREATE EVENT <event_name>;
Or:
SHOW CREATE EVENT <event_name>\G
Upvotes: 1
Reputation: 34230
Use MySQL's show create event statement to see the create event
statement including its body containing the event code.
Upvotes: 7