Home >Database >Mysql Tutorial >How can we rename existing MySQL events?
By using the ALTER EVENT statement and the RENAME keyword, we can rename an existing event. To illustrate this, we have the following example where we rename the event 'Hello' to 'Hello_renamed' -
mysql> ALTER EVENT Hello RENAME TO Hello_renamed; Query OK, 0 rows affected (0.00 sec)
To confirm that the event has been renamed, we can try using Old name deletion event, MySQL will throw the following error −
mysql> DROP EVENT hello; ERROR 1539 (HY000): Unknown event 'hello'
The above is the detailed content of How can we rename existing MySQL events?. For more information, please follow other related articles on the PHP Chinese website!