我想在某个数据库中创建存储过程列表。 我试过了
db2 "display procedure MyDb.*"
但我收到错误
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
在另一个论坛中,我读到我必须查询表syscat.procedures
但如果我打电话
db2“select * from syscat.procedures”
我得到了很多我无法理解的数据。
答案 0 :(得分:10)
删除详细信息......这只会显示过程名称:
db2“从syscat.procedures中选择procname,其中procschema ='MYSCHEMA'”
答案 1 :(得分:0)
不要直接查询syscat.procedures表,而是尝试使用SQLProcedures()存储过程。您可以使用许多输入参数来自定义结果。