Rechercher dans le manuel MySQL

13.7.6.9 SHOW CREATE PROCEDURE Syntax

This statement is a MySQL extension. It returns the exact string that can be used to re-create the named stored procedure. A similar statement, SHOW CREATE FUNCTION, displays information about stored functions (see Section 13.7.6.8, “SHOW CREATE FUNCTION Syntax”).

To use either statement, you must have the global SELECT privilege.

  1. mysql> SHOW CREATE PROCEDURE test.simpleproc\G
  2. *************************** 1. row ***************************
  3.            Procedure: simpleproc
  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.     Create Procedure: CREATE PROCEDURE `simpleproc`(OUT param1 INT)
  9.                       BEGIN
  10.                       SELECT COUNT(*) INTO param1 FROM t;
  11.                       END
  12. character_set_client: utf8mb4
  13. collation_connection: utf8mb4_0900_ai_ci
  14.   Database Collation: utf8mb4_0900_ai_ci
  15.  
  16. mysql> SHOW CREATE FUNCTION test.hello\G
  17. *************************** 1. row ***************************
  18.             Function: hello
  19.             sql_mode: ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,
  20.                       NO_ZERO_IN_DATE,NO_ZERO_DATE,
  21.                       ERROR_FOR_DIVISION_BY_ZERO,
  22.                       NO_ENGINE_SUBSTITUTION
  23.      Create Function: CREATE FUNCTION `hello`(s CHAR(20))
  24.                       RETURNS char(50) CHARSET utf8mb4
  25.                       RETURN CONCAT('Hello, ',s,'!')
  26. character_set_client: utf8mb4
  27. collation_connection: utf8mb4_0900_ai_ci
  28.   Database Collation: utf8mb4_0900_ai_ci

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


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-procedure.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