Rechercher dans le manuel MySQL

13.7.6.7 SHOW CREATE EVENT Syntax

  1. SHOW CREATE EVENT event_name

This statement displays the CREATE EVENT statement needed to re-create a given event. It requires the EVENT privilege for the database from which the event is to be shown. For example (using the same event e_daily defined and then altered in Section 13.7.6.18, “SHOW EVENTS Syntax”):

  1. mysql> SHOW CREATE EVENT myschema.e_daily\G
  2. *************************** 1. row ***************************
  3.                Event: e_daily
  4.             sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
  5.                       NO_ZERO_IN_DATE,NO_ZERO_DATE,
  6.                       ERROR_FOR_DIVISION_BY_ZERO,
  7.                       NO_ENGINE_SUBSTITUTION
  8.            time_zone: SYSTEM
  9.         Create Event: CREATE DEFINER=`jon`@`ghidora` EVENT `e_daily`
  10.                         ON SCHEDULE EVERY 1 DAY
  11.                         STARTS CURRENT_TIMESTAMP + INTERVAL 6 HOUR
  12.                         ON COMPLETION NOT PRESERVE
  13.                         ENABLE
  14.                         COMMENT 'Saves total number of sessions then
  15.                                clears the table each day'
  16.                         DO BEGIN
  17.                           INSERT INTO site_activity.totals (time, total)
  18.                             SELECT CURRENT_TIMESTAMP, COUNT(*)
  19.                               FROM site_activity.sessions;
  20.                           DELETE FROM site_activity.sessions;
  21.                         END
  22. character_set_client: utf8mb4
  23. collation_connection: utf8mb4_0900_ai_ci
  24.   Database Collation: utf8mb4_0900_ai_ci

character_set_client is the session value of the character_set_client system variable when the event was created. collation_connection is the session value of the collation_connection system variable when the event was created. Database Collation is the collation of the database with which the event is associated.

The output reflects the current status of the event (ENABLE) rather than the status with which it was created.


Find a PHP function

Document created the 26/06/2006, last modified the 26/10/2018
Source of the printed document:https://www.gaudry.be/en/mysql-rf-show-create-event.html

The infobrol is a personal site whose content is my sole responsibility. The text is available under CreativeCommons license (BY-NC-SA). More info on the terms of use and the author.

References

  1. View the html document Language of the document:en Manuel MySQL : https://dev.mysql.com/

These references and links indicate documents consulted during the writing of this page, or which may provide additional information, but the authors of these sources can not be held responsible for the content of this page.
The author This site is solely responsible for the way in which the various concepts, and the freedoms that are taken with the reference works, are presented here. Remember that you must cross multiple source information to reduce the risk of errors.

Contents Haut