Example: SHOW FUNCTION (External Form) - Analytics Database - Teradata Vantage

SQL Data Definition Language Syntax and Examples

Deployment
VantageCloud
VantageCore
Edition
Enterprise
IntelliFlex
VMware
Product
Analytics Database
Teradata Vantage
Release Number
17.20
Published
June 2022
Language
English (United States)
Last Update
2024-10-04
dita:mapPath
jco1628111346878.ditamap
dita:ditavalPath
qkf1628213546010.ditaval
dita:id
mdr1472255012272
lifecycle
latest
Product Category
Teradata Vantage™

This example reports the current DDL and function body for the specific external function name addnum.

     SHOW FUNCTION addnum;

Result:

      *** Text of DDL statement returned. 
      *** Total elapsed time was 1 second.
     ------------------------------------------------------------
     REPLACE FUNCTION rgs.add_num (p1 INTEGER, p2 FLOAT)
      RETURNS FLOAT 
      SPECIFIC add_num 
      LANGUAGE C 
      NO SQL 
      PARAMETER STYLE SQL 
      NOT DETERMINISTIC 
      CALLED ON NULL INPUT 
      EXTERNAL NAME 'cs!first1!udftest/first1.c!F!first1' 
      *** Text of DDL statement returned. 
     #define SQL_TEXT Latin_Text
     #include <sqltypes_td.h>
     /* add integer and float */
     void first1(INTEGER  *a,
                 FLOAT    *b,
                 FLOAT    *result,
                 INT      *indc_a,
                 INT      *indc_b,
                 INT      *indc_result,
                 CHAR     sqlstate[6],
                 SQL_TEXT extname[129],
                 SQL_TEXT specific_name[129],
                 SQL_TEXT error_message[257])
        {
        if (*indc_a == -1 || *indc_b == -1)
        {
            *indc_result = -1;
            return;
        }
        *result = *a + *b;
        *indc_result = 0;
        }