mysql - Mysql中通过注释选择存储过程名称

标签 mysql select stored-procedures

如何在Mysql中通过注释获取存储过程名称?

例如我需要这样的东西:

    SELECT *
    FROM stored_procedures
    WHERE comment LIKE '%something%''

最佳答案

您可以使用以下代码从information_schema获取存储过程名称:

SELECT routine_schema,      -- database/schema wherein the object resides
       routine_name,        -- the name of the function/procedure
       routine_type,        -- PROCEDURE indicates a procedure, FUNCTION indicates a function
       routine_definition   -- code underlying the sp
       routine_comment      -- some human readable comment on the routine
  FROM information_schema.routines
  WHERE routine_comment LIKE '%test%';

关于mysql - Mysql中通过注释选择存储过程名称,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50133058/

相关文章:

mysql - 了解在右侧元素上使用 AND 的左外连接,仍然会导致重复条目(使用 sql fiddle)

javascript - jQuery .change() 对带有 1 个选项的选择没有反应

sql-server - 如何使用希伯来语传递 SQL 存储过程 NVARCHAR 参数?

MySQL 6.3 - 创建过程语法错误

php - 从数据库构建树多维数组

mysql - MS Access 查询计算字段

mysql - 基于一列连接两个查询结果

javascript - Angular .js : HTML select element with ng-options of object-properties

php - MySQL 按一列对行进行分组并按另一列排序

mysql - Mysql 中的存储过程不接受输入参数