SQL db2 数据库中的存储过程列表
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/15600755/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
db2 list of stored procedure in a database
提问by Abruzzo Forte e Gentile
I would like to have the list of stored procedure created in a certain database. I tried
我想在某个数据库中创建存储过程列表。我试过
db2 "display procedure MyDb.*"
But I get error
但我得到错误
DB21034E The command was processed as an SQL statement because it was not a
valid Command Line Processor command. During SQL processing it returned:
SQL0104N An unexpected token "procedure" was found following "display ".
Expected tokens may include: "JOIN <joined_table>". SQLSTATE=42601
In another forum I read that I have to query the table syscat.procedures
在另一个论坛我读到我必须查询表 syscat.procedures
but if I call
但如果我打电话
db2 "select * from syscat.procedures"
db2“从 syscat.procedures 中选择 *”
I get a lot of data I cannot really understand.
我得到了很多我无法真正理解的数据。
回答by David Plumpton
Cut down the details... this will just show you the procedure names:
减少细节...这将只显示程序名称:
SELECT procname FROM syscat.procedures WHERE procschema = 'MYSCHEMA'
SELECT procname FROM syscat.procedures WHERE procschema = 'MYSCHEMA'
回答by Rob Breidecker
Instead of querying the syscat.procedures table directly, try using the SQLProcedures()stored procedure instead. There are a number of input parameters you can use to customize your result.
不要直接查询 syscat.procedures 表,而是尝试使用SQLProcedures()存储过程。您可以使用许多输入参数来自定义结果。