如何在PhpMyAdmin中列出/查看存储过程

时间:2022-10-30 10:11:48

I want to list or view created stored procedure in PhpMyAdmin. I have created 1 stored procedure and execute that also but how can i view or modify particular stored procedure is it possible or not and please explain its good practise to create stored procedure using PhpMyAdmin or what are the other ways(any other tool) to program with stored procedures , i am new to MySql and PhpMyAdmin .

我想在PhpMyAdmin中列出或查看创建的存储过程。我已经创建了1个存储过程并执行它但是我如何查看或修改特定存储过程是否可能,请解释其使用PhpMyAdmin创建存储过程的良好实践或其他方式(任何其他工具)进行编程使用存储过程,我是MySql和PhpMyAdmin的新手。

Please Help

1 个解决方案

#1


9  

Take a look at the information_schema. In your case to the routines table.

看一下information_schema。在你的情况下到例程表。

http://dev.mysql.com/doc/refman/5.1/en/routines-table.html

If you want to list all stored procedures you can use this query

如果要列出所有存储过程,可以使用此查询

select * 
from information_schema.routines
where routine_type = 'procedure'

In order to limit the result to a specific database:

为了将结果限制为特定数据库:

select * 
from information_schema.routines
where routine_type = 'procedure' and routine_schema = 'your_db'

You can find the content of your stored procedures within the routine_definition field.

您可以在routine_definition字段中找到存储过程的内容。

Moreover take a look at:

另外看看:

show create procedure stored_procedure_name

you'll find stored procedure content within 'Create Procedure' field.

您将在“创建过程”字段中找到存储过程内容。

#1


9  

Take a look at the information_schema. In your case to the routines table.

看一下information_schema。在你的情况下到例程表。

http://dev.mysql.com/doc/refman/5.1/en/routines-table.html

If you want to list all stored procedures you can use this query

如果要列出所有存储过程,可以使用此查询

select * 
from information_schema.routines
where routine_type = 'procedure'

In order to limit the result to a specific database:

为了将结果限制为特定数据库:

select * 
from information_schema.routines
where routine_type = 'procedure' and routine_schema = 'your_db'

You can find the content of your stored procedures within the routine_definition field.

您可以在routine_definition字段中找到存储过程的内容。

Moreover take a look at:

另外看看:

show create procedure stored_procedure_name

you'll find stored procedure content within 'Create Procedure' field.

您将在“创建过程”字段中找到存储过程内容。