要显示存储过程的描述,以下是语法-SHOW CREATE PROCEDURE yourProcedureName();
让我们首先创建一个存储过程-mysql> DELIMITER //
mysql> CREATE PROCEDURE sample_Procedure()
BEGIN
SELECT "HELLO MYSQL!!!!";
END
//
mysql> DELIMITER ;
使用CALL命令调用存储过程。mysql> call sample_Procedure();
这将产生以下输出-+-----------------+
| HELLO MYSQL!!!! |
+-----------------+
| HELLO MYSQL!!!! |
+-----------------+
1 row in set (0.00 sec)
以下是查询以显示上面创建的MySQL存储过程的描述-mysql> show create procedure sample_Procedure;
这将产生以下输出-+------------------+--------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+
| Procedure | sql_mode | Create Procedure | character_set_client | collation_connection | Database Collation |
+------------------+--------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+
| sample_Procedure | STRICT_TRANS_TABLES,NO_ENGINE_SUBSTITUTION | CREATE DEFINER=`root`@`%` PROCEDURE `sample_Procedure`() BEGIN SELECT "HELLO MYSQL!!!!"; END | utf8 | utf8_general_ci | utf8_unicode_ci |
+------------------+--------------------------------------------+-----------------------------------------------------------------------------------------------+----------------------+----------------------+--------------------+
1 row in set (0.00 sec)
mysql存储过程 map mysql存储过程输出日志
转载文章标签 mysql存储过程 map mysql 过程描述 mysql 存储过程 ci 文章分类 MySQL 数据库