17.10 - Example: SHOW PROCEDURE - Advanced SQL Engine - Teradata Database

Teradata Vantage™ - SQL Data Definition Language Syntax and Examples

Product
Advanced SQL Engine
Teradata Database
Release Number
17.10
Release Date
July 2021
Content Type
Programming Reference
Publication ID
B035-1144-171K
Language
English (United States)

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;