Home > Database > Mysql Tutorial > body text

How can we view the source code of a specific MySQL stored function?

WBOY
Release: 2023-09-04 08:29:02
forward
770 people have browsed it

我们如何查看特定 MySQL 存储函数的源代码?

With the SHOW CREATE FUNCTION statement, we can see the source code of the stored function. To make it understand, we use a stored function called Hello() in the query as follows -

mysql> SHOW CREATE FUNCTION Hello\G
*************************** 1. row ***************************

           Function: Hello
           sql_mode:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Create Function: CREATE DEFINER=`root`@`localhost` FUNCTION `Hello`(S Varchar(20)) RETURNS varchar(20) CHARSET latin1 DETERMINISTIC
RETURN CONCAT('Hello, ',S,'!')

character_set_client: cp850
collation_connection: cp850_general_ci
  Database Collation: latin1_swedish_ci
1 row in set (0.00 sec)
Copy after login

The above is the detailed content of How can we view the source code of a specific MySQL stored function?. For more information, please follow other related articles on the PHP Chinese website!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!