1. 程式人生 > >DB2 根據表名查詢儲存過程

DB2 根據表名查詢儲存過程

–根據表名查詢儲存過程(不加模式名)
SELECT PROCSCHEMA, –模式名
PROCNAME –儲存過程名
FROM SYSCAT.PROCEDURES
WHERE SPECIFICNAME IN (SELECT DNAME
FROM SYSIBM.SYSDEPENDENCIES
WHERE BNAME IN (SELECT PKGNAME
FROM SYSCAT.PACKAGEDEP
WHERE BSCHEMA = ‘APP_FAT’ –模式名
AND BNAME = ‘APPAUTFEE’ –表名
))