SHOW PROCEDURES
Go Up to isql Command Reference
Lists all procedures or displays the text of a specified procedure.
SHOW {PROCEDURES | PROCEDURE name};
Argument | Description |
---|---|
<name> |
Name of an existing procedure in the current database |
Description: SHOW PROCEDURES
displays an alphabetical list of procedures, along with the database objects they depend on. Deleting a database object that has a dependent procedure is not allowed. To avoid an isql
error, delete the procedure (using DROP PROCEDURE
) before deleting the database object.
SHOW PROCEDURE
name displays the text and parameters of the named procedure.
SHOW PROCEDURE
has a shorthand equivalent, SHOW PROC
.
Examples: To list all procedures defined for the current database, enter:
SHOW PROCEDURES;
Procedure Name Dependency Type
================= ==================== =======
ADD_EMP_PROJ EMPLOYEE_PROJECT Table
UNKNOWN_EMP_ID Exception
DELETE_EMPLOYEE DEPARTMENT Table
EMPLOYEE Table
EMPLOYEE_PROJECT Table
PROJECT Table
REASSIGN_SALES Exception
SALARY_HISTORY Table
SALES Table
DEPT_BUDGET DEPARTMENT Table
DEPT_BUDGET Procedure
. . .
To display the text of the procedure, ADD_EMP_PROJ
, enter:
SHOW PROC ADD_EMP_PROJ;
Procedure text:
============================================================
BEGIN
BEGIN
INSERT INTO EMPLOYEE_PROJECT (EMP_NO, PROJ_ID) VALUES (:emp_no,
:proj_id);
WHEN SQLCODE -530 DO
EXCEPTION UNKNOWN_EMP_ID;
END
RETURN;
END
=================================================================
Parameters:
EMP_NO INPUT SMALLINT
PROJ_ID INPUT CHAR(5)