SHOW EVENTS Syntax


This statement displays information about Event Manager events. It requires the EVENT privilege for the database from which the events are to be shown.

In its simplest form, SHOW EVENTS lists all of the events in the current schema:

mysql> SELECT CURRENT_USER(), SCHEMA();
+----------------+----------+
| CURRENT_USER() | SCHEMA() |
+----------------+----------+
| jon@ghidora | myschema |
+----------------+----------+
1 row in set (0.00 sec)
mysql> SHOW EVENTS\G
*************************** 1. row ***************************
 Db: myschema
 Name: e_daily
 Definer: jon@ghidora
 Time zone: SYSTEM
 Type: RECURRING
 Execute at: NULL
 Interval value: 10
 Interval field: SECOND
 Starts: 2006-02-09 10:41:23
 Ends: NULL
 Status: ENABLED
 Originator: 0
character_set_client: latin1
collation_connection: latin1_swedish_ci
 Database Collation: latin1_swedish_ci

To see events for a specific schema, use the FROM clause. For example, to see events for the test schema, use the following statement:

SHOW EVENTS FROM test;

The LIKE clause, if present, indicates which event names to match. The WHERE clause can be given to select rows using more general conditions, as discussed in , "Extensions to SHOW Statements".

SHOW EVENTS output has the following columns:

For more information about SLAVE_DISABLED and the Originator column, see , "Replication of Invoked Features".

The event action statement is not shown in the output of SHOW EVENTS. Use SHOW CREATE EVENT or the INFORMATION_SCHEMA.EVENTS table.

Times displayed by SHOW EVENTS are given in the event time zone, as discussed in , "Event Metadata".

The columns in the output of SHOW EVENTS are similar to, but not identical to the columns in the INFORMATION_SCHEMA.EVENTS table. See , "The INFORMATION_SCHEMA EVENTS Table".

Retornar