2

我想在某个数据库中创建存储过程的列表。我试过了

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“从 syscat.procedures 中选择 *”

我得到了很多我无法真正理解的数据。

4

2 回答 2

12

减少细节......这只会显示程序名称:

SELECT procname FROM syscat.procedures WHERE procschema = 'MYSCHEMA'

于 2013-08-06T02:55:07.600 回答
0

不要直接查询 syscat.procedures 表,而是尝试使用SQLProcedures()存储过程。您可以使用许多输入参数来自定义结果。

于 2013-03-24T18:46:47.607 回答