Home > Database > Mysql Tutorial > body text

How can we rename existing MySQL events?

王林
Release: 2023-08-29 18:09:07
forward
1031 people have browsed it

我们如何重命名现有的 MySQL 事件?

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' -

Example

mysql> ALTER EVENT Hello RENAME TO Hello_renamed;
Query OK, 0 rows affected (0.00 sec)
Copy after login

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'
Copy after login

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!