- procedure_name
- The name of the SQL procedure whose most recent SQL create text is to be reported.
SHOW PROCEDURE displays procedure text as it was sent to the database. You must type line breaks in the procedure using the Enter or Return key to properly display the text.
Example: SHOW PROCEDURE
Following is an example shows the DDL for a procedure named spSample1:
SHOW PROCEDURE spSample1; *** Text of DDL statement returned. *** Total elapsed time was 1 second. ----------------------------------------------------------------- CREATE PROCEDURE spSample1 (IN ip INTEGER, OUT op INTEGER) BEGIN DECLARE var_1 INTEGER; SELECT col1 INTO var_1 FROM tab_1 WHERE col_2 = ip; SET op = var1 * 10; END;
Example: Showing a Java External Stored Procedure with an XML Data Type
This example shows the DDL for a Java external stored procedure with an XML data type as an input parameter:
SHOW PROCEDURE get_XML; *** Text of DDL statement returned. *** Total elapsed time was 1 second. --------------------------------------------------------------------- REPLACE PROCEDURE get_XML(IN X1 XML, INOUT A1 INTEGER) LANGUAGE JAVA NO SQL PARAMETER STYLE JAVA EXTERNAL NAME 'UDF_JAR:UserDefinedFunctions.get_XML(java.sql.SQLXML, int[])’;