arrow-left
All pages
gitbookPowered by GitBook
1 of 1

Loading...

DROP EVENT

Remove a scheduled event from the server. This command stops the event from executing and deletes its definition from the system tables.

hashtag
Syntax

hashtag
Description

This statement drops the event named event_name. The event immediately ceases being active, and is deleted completely from the server.

If the event does not exist, the errorERROR 1517 (HY000): Unknown event 'event_name' results. You can override this and cause the statement to generate a NOTE for non-existent events instead by usingIF EXISTS. See .

This statement requires the privilege.

hashtag
Examples

Using the IF EXISTS clause:

hashtag
See also

This page is licensed: GPLv2, originally from

DROP EVENT [IF EXISTS] event_name
SHOW WARNINGS
EVENTarrow-up-right
Events Overview
CREATE EVENT
SHOW CREATE EVENT
ALTER EVENT
fill_help_tables.sqlarrow-up-right
DROP EVENT myevent3;
DROP EVENT IF EXISTS myevent3;
Query OK, 0 rows affected, 1 warning (0.01 sec)

SHOW WARNINGS;
+-------+------+-------------------------------+
| Level | Code | Message                       |
+-------+------+-------------------------------+
| Note  | 1305 | Event myevent3 does not exist |
+-------+------+-------------------------------+
spinner