This is a read-only copy of the MariaDB Knowledgebase generated on 2024-11-21. For the latest, interactive version please visit https://mariadb.com/kb/.

SHOW EVENTS

Sintassi

SHOW EVENTS [{FROM | IN} nome_schema]
    [LIKE 'pattern' | WHERE espr]

Spiegazione

Nella sua forma più semplice, SHOW EVENTS elenca tutti gli eventi presenti nello schema corrente:

MariaDB [(none)]> SELECT CURRENT_USER(), SCHEMA();
+----------------+----------+
| CURRENT_USER() | SCHEMA() |
+----------------+----------+
| jon@ghidora    | myschema |
+----------------+----------+
1 row in set (0.00 sec)

MariaDB [test]> 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

Per conoscere gli eventi contenuti in uno schema specifico, si usi la clausola FROM. Per esempio, per ottenere gli eventi presenti nel database test, si può eseguire:

SHOW EVENTS FROM test;

La clausola LIKE, se presente, mostra solo gli eventi i cui nomi corrispondono al pattern. La clausola WHERE può essere usata per specificare condizioni più generali, come spiegato in http://dev.mysql.com/doc/refman/5.1/en/extended-show.html.

Content reproduced on this site is the property of its respective owners, and this content is not reviewed in advance by MariaDB. The views, information and opinions expressed by this content do not necessarily represent those of MariaDB or any other party.