Вопрос

Is there a way to view the body of a MySQL event? The SQL part after the DO section? I can easily rename, enable, disable, even alter the schedule and the body separately, but exactly viewing what my event is doing, seems arduous to achieve.

The closest thing I've found was using the recreate command SHOW CREATE EVENT event_name, like explained here on the official MySQL site.

Is there another command or trick to retrieve the body of a MySQL event?

Это было полезно?

Решение

Running the following command retrieves the body of a mysql event:

SELECT EVENT_DEFINITION FROM INFORMATION_SCHEMA.EVENTS WHERE EVENT_NAME='event_name'
Лицензировано под: CC-BY-SA с атрибуция
Не связан с dba.stackexchange
scroll top