# ALTER EVENT

Modifies one or more characteristics of an existing event.

## Syntax

```sql
ALTER
    [DEFINER = { user | CURRENT_USER }]
    EVENT event_name
    [ON SCHEDULE schedule]
    [ON COMPLETION [NOT] PRESERVE]
    [RENAME TO new_event_name]
    [ENABLE | DISABLE | DISABLE ON SLAVE]
    [COMMENT 'comment']
    [DO sql_statement]
```

## Description

The `ALTER EVENT` statement is used to change one or more of the characteristics of an existing [event](https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/events) 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](https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-event).

This statement requires the [EVENT](https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/grant#database-privileges) privilege. When a user executes a successful `ALTER EVENT` statement, that user becomes the definer for the affected event.

(In MySQL 5.1.11 and earlier, an event could be altered only by its definer, or by a user having the [SUPER](https://mariadb.com/docs/server/reference/sql-statements/account-management-sql-statements/grant#global-privileges) privilege.)

`ALTER EVENT` works only with an existing event:

```sql
ALTER EVENT no_such_event ON SCHEDULE EVERY '2:3' DAY_HOUR;
ERROR 1539 (HY000): Unknown event 'no_such_event'
```

## Examples

```sql
ALTER EVENT myevent 
  ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 2 HOUR 
  DO 
    UPDATE myschema.mytable SET mycol = mycol + 1;
```

## See Also

* [Events Overview](https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/events)
* [CREATE EVENT](https://mariadb.com/docs/server/reference/sql-statements/data-definition/create/create-event)
* [SHOW CREATE EVENT](https://mariadb.com/docs/server/reference/sql-statements/administrative-sql-statements/show/show-create-event)
* [DROP EVENT](https://mariadb.com/docs/server/reference/sql-statements/data-definition/drop/drop-event)

<sub>*This page is licensed: GPLv2, originally from*</sub> [<sub>*fill\_help\_tables.sql*</sub>](https://github.com/MariaDB/server/blob/main/scripts/fill_help_tables.sql)

{% @marketo/form formId="4316" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://mariadb.com/docs/server/server-usage/triggers-events/event-scheduler/alter-event.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
