How do I list all stored procedures in Informix?

五迷三道 提交于 2019-11-30 21:06:59
Adrian Carneiro

Yes, there is. It's called sysprocedures. Try this to see all there's to see:

select * from sysprocedures

For more information on what detailed information is available, read about sysprocedures and sysprocbody and sysproccolumns.

CheeseConQueso
select sysprocedures.procname from sysprocedures;

Get the procid of the stored procedure from the below query

select sysprocedures.procname,sysprocedures.procid from sysprocedures

and provide the procid in the below query to view the whole stored procedure

select data from sysprocbody where procid = @procid and datakey = 'T' order by seqno

You can get the contents of the stored procedures (the text) with dbschema: dbschema -d -f all or dbschema -d -f

The text of the procedure is also in the sysprocbody table "where datakey='T'"

so: select data from sysprocbody where procid in (select procid from sysprocedures where procname='') and datakey='T' order by seqno; -- Note that in older Informix, this would complain that seqno had to be included in the list of selected columns.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!