MySQL tutorial: ALTER EVENT [EN]
top of page
CerebroSQL

MySQL: 

ALTER EVENT

Syntax:
ALTER
[DEFINER = user]
EVENT event_name
[ON SCHEDULE schedule]
[ON COMPLETION [NOT] PRESERVE]
[RENAME TO new_event_name]
[ENABLE | DISABLE | DISABLE ON SLAVE]
[COMMENT 'string']
[DO event_body]

The ALTER EVENT statement changes one or more of the characteristics of
an existing event without the need to drop and recreate it. The syntax
for each of the DEFINER, ON SCHEDULE, ON COMPLETION, COMMENT, ENABLE /
DISABLE, and DO clauses is exactly the same as when used with CREATE
EVENT. (See [HELP CREATE EVENT].)

Any user can alter an event defined on a database for which that user
has the EVENT privilege. When a user executes a successful ALTER EVENT
statement, that user becomes the definer for the affected event.

ALTER EVENT works only with an existing event:

mysql> ALTER EVENT no_such_event
> ON SCHEDULE
> EVERY '2:3' DAY_HOUR;
ERROR 1517 (HY000): Unknown event 'no_such_event'

URL: https://dev.mysql.com/doc/refman/8.0/en/alter-event.html

Example

bottom of page