如何在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/